Commit graph

2231 commits

Author SHA1 Message Date
Renovate Bot
0d438a746f chore(deps): update dependency @types/jest to v23.3.2 2018-09-08 04:16:36 +00:00
C.J. Winslow
408198e5ac Pass the context request and response extension methods (#1547)
* Pass the context along to all the extension methods

Addresses #1343 

With this change you should now be able to implement an extension like so:

```javascript
class MyErrorTrackingExtension extends GraphQLExtension {
    willSendResponse(o) {
        const { context, graphqlResponse } = o

        context.trackErrors(graphqlResponse.errors)

        return o
    }
}
```

Edit by @evans :
fixes #1343
fixes #614 as the request object can be taken from context or from requestDidStart
fixes #631 ""

* Remove context from extra extension functions

The context shouldn't be necessary for format, parse, validation, and
execute. Format generally outputs the state of the extension. Parse and
validate don't depend on the context. Execution includes the context
argument as contextValue

* Move change entry under vNext
2018-09-07 18:10:30 -07:00
Renovate Bot
8875022a4c chore(deps): update dependency supertest to v3.3.0 2018-09-07 05:28:18 +00:00
Renovate Bot
6e930d21a8 chore(deps): update dependency graphql to v14.0.2 2018-09-07 03:18:37 +00:00
renovate[bot]
db945a4ef0 chore(deps): update dependency lerna to v3.3.0 (#1621) 2018-09-06 14:09:32 +02:00
renovate[bot]
c52438315f chore(deps): update dependency @types/graphql to v14 (#1620) 2018-09-06 13:52:24 +02:00
Martijn Walraven
996c73063a Publish
- apollo-engine-reporting@0.0.4
 - apollo-server-cloud-functions@2.0.3
 - apollo-server-cloudflare@2.0.4
 - apollo-server-core@2.0.6
 - apollo-server-express@2.0.6
 - apollo-server-hapi@2.0.6
 - apollo-server-integration-testsuite@2.0.6
 - apollo-server-koa@2.0.6
 - apollo-server-lambda@2.0.6
 - apollo-server-micro@2.0.6
 - apollo-server@2.0.7
2018-09-05 17:33:16 +02:00
Martijn Walraven
c31d2e5747 Update CHANGELOG.md 2018-09-05 17:26:49 +02:00
renovate[bot]
6bc97b0b01 chore(deps): update dependency supertest to v3.2.0 (#1618) 2018-09-05 17:25:00 +02:00
Martijn Walraven
3e98fefc49 Fix return statement required by TypeScript in apollo-server-micro 2018-09-05 17:13:03 +02:00
Dries Vandermeulen
4ab7bb3f1a Fix apolo-server-micro top level error response (#1619)
Fixes #1581.
2018-09-05 16:03:04 +02:00
Vincenzo Russo
88417b7398 Switch ApolloServerBase.schema from private access to protected access (#1610) 2018-09-05 16:02:06 +02:00
Evans Hauser
4a409766a5 Add toggle for including error messages in reports (#1615)
Fixes #1613.

We always send traces that includes an error node if the trace has an
error. In the case that sending errors is disabled, we replace the
message and remove the location.

Note that the Engine proxy strips all error information from the traces
with noErrorTraces set. To get errors to show up in the ui, the proxy
sends error counts inside of the aggregated stats reports. To get
similar behavior inside of the apollo server metrics reporting, we
always send a trace and mask out the PII.
2018-09-05 16:01:14 +02:00
Ryan Maxwell
b349b43a2f Fix typo in performance scaling paragraph (#1605) 2018-09-05 15:57:09 +02:00
Marcel Miranda Ackerman
1348933d33 Fix Google Cloud Functions tests (#1616)
Closes #1601.
2018-09-05 15:54:42 +02:00
Martijn Walraven
b80a8f050c Publish
- apollo-cache-control@0.2.3
 - apollo-datasource-rest@0.1.5
 - apollo-datasource@0.1.3
 - apollo-engine-reporting@0.0.3
 - apollo-server-cache-memcached@0.1.3
 - apollo-server-cache-redis@0.1.3
 - apollo-server-cloud-functions@2.0.2
 - apollo-server-cloudflare@2.0.3
 - apollo-server-core@2.0.5
 - apollo-server-env@2.0.3
 - apollo-server-express@2.0.5
 - apollo-server-hapi@2.0.5
 - apollo-server-integration-testsuite@2.0.5
 - apollo-server-koa@2.0.5
 - apollo-server-lambda@2.0.5
 - apollo-server-micro@2.0.5
 - apollo-server@2.0.6
 - apollo-tracing@0.2.3
 - graphql-extensions@0.1.3
2018-09-03 15:06:00 +02:00
Martijn Walraven
bf56d51e19 Update package-lock.json 2018-09-03 14:59:27 +02:00
Martijn Walraven
94ff82c636 Add apollo-server-integration-testsuite as devDependency to integration packages
This fixes ordering of tasks invoked through `lerna run`.
2018-09-03 14:47:25 +02:00
Renovate Bot
415d70738d chore(deps): update dependency redis-mock to v0.32.0 2018-09-03 10:37:06 +00:00
Martijn Walraven
7a472a3041 Make node-fetch extension properties optional 2018-09-02 12:01:13 +02:00
Shinya Ohira
6c44631657 Add node-fetch extensions typing (#1602) 2018-09-02 11:53:53 +02:00
Martijn Walraven
49d4ffb682 Augment typeDefs with cacheControl directive so SDL validation doesn't fail 2018-09-02 11:50:09 +02:00
Martijn Walraven
884d44e771 Use consistent range for graphql peer dependency 2018-09-02 11:50:09 +02:00
Renovate Bot
8b2adc49ad chore(deps): update dependency graphql to v14 2018-09-02 11:50:09 +02:00
Martijn Walraven
665820ec3c Add .prettierignore 2018-09-02 09:58:49 +02:00
Renovate Bot
66ff449bcf chore(deps): pin dependencies 2018-09-01 15:27:00 +02:00
Martijn Walraven
4bb6c74eea Remove stray devDependencies from packages 2018-09-01 14:48:30 +02:00
Martijn Walraven
e7f353859e Add test:watch script 2018-09-01 14:01:29 +02:00
Martijn Walraven
1be8547125 Rename npm circle script to test:ci and don't lint 2018-09-01 13:46:36 +02:00
Martijn Walraven
a7301080b7 Remove Prettier settings from .vscode/settings.json 2018-09-01 11:54:46 +02:00
Martijn Walraven
b9876b75bf Remove forceConsistentCasingInFileNames from tsconfig.json 2018-09-01 11:51:48 +02:00
Martijn Walraven
3f595eb3de Use fly.io app env when available 2018-09-01 11:37:45 +02:00
Martijn Walraven
497b514511 Add processRequest to apollo-upload-server types 2018-09-01 11:37:45 +02:00
Martijn Walraven
ef67851997 Only require apollo-upload-server if uploads are enabled 2018-09-01 11:37:45 +02:00
Martijn Walraven
78d787908e Make apollo-server-env work with Cloudflare Workers and fly.io 2018-09-01 11:37:45 +02:00
Martijn Walraven
77064afa66 Add browser entry point to export globals from apollo-server-env 2018-09-01 11:37:45 +02:00
Martijn Walraven
d7e16a0e30 chore(deps): update dependency typescript to v3 2018-09-01 10:39:01 +02:00
Martijn Walraven
b0433e2b34 Regenerate package-lock.json 2018-09-01 10:23:34 +02:00
Yipeng Zhao
984c47d07a Use playground default settings when possible (#1516)
Playground can either use external settings or its default settings (browser settings), in incompatible ways. The original implementation of default settings here would always provide 'settings' for Playground, in turn make its own settings mechanism disabled, with consequences such as altering settings in-browser cannot work as expect. Besides, once the default settings here go different with Playground provided, it would cause other problems.

The intention here is to use Playground setting as default, while explicit passing Playground settings in Apollo server would still work with defaults defined here merged.
2018-09-01 09:50:10 +02:00
Zak Mandhro
34ece7552b Added description and sample code for enabling SSL 2018-09-01 09:41:13 +02:00
Rob Richard
8d519c0550 Update changelog 2018-09-01 09:34:38 +02:00
Rob Richard
23ee9ec53e Update default version of graphql-playground 2018-09-01 09:34:38 +02:00
xAKLx
27d65a1d6a Fix "To be successful" line 2018-09-01 09:25:30 +02:00
Martijn Walraven
6b5e6f0c69 Clean up lerna.json 2018-08-31 11:01:32 +02:00
Jesse Rosenberger
78f1754248
Merge pull request #1574 from apollographql/renovate/hexo-related
chore(deps): update dependency hexo-server to v0.3.3
2018-08-28 13:20:32 +03:00
Renovate Bot
e848353814
chore(deps): update dependency hexo-server to v0.3.3 2018-08-28 09:25:12 +00:00
Jesse Rosenberger
f9aec36cf4
Merge pull request #1589 from apollographql/abernix/add-netlify-toml-fix-docs
Add `netlify.toml` configuration to fix docs generation errors.
2018-08-28 12:20:37 +03:00
Jesse Rosenberger
d38ee1cf7d
Add the package-lock.json file for the docs/ sub-dir for reproducibility.
The documentation deployment will be less prone to transitive dependency
changes by introducing a `package-lock.json` file.
2018-08-28 12:08:13 +03:00
Jesse Rosenberger
d6921bb5e6
Introduce a netlify.toml configuration to fix docs generation on Netlify.
Without this file, Netlify was choosing to build the documentation using the
npm scripts present in the root `package.json`, rather than the `package.json`
in the `docs/` directory, as it should be.

While it's strange that this behavior just cropped up around a recent swap to
using `@apollographql/apollo-upload-server`, I suspect that the problem is
more deeply rooted than that and we were just accidentally getting away with
the past behavior - which was defined less explicitly in the Netlify UI.

Now, with this `netlify.toml` file, we can run the exact build step we need
for documentation and also gain the ability to have per-branch control over
that configuration, which has been necessary in the past.
2018-08-28 12:05:12 +03:00
Evans Hauser
2657e9b25b
Publish
- apollo-server-cloud-functions@2.0.1
 - apollo-server-cloudflare@2.0.2
 - apollo-server-core@2.0.4
 - apollo-server-express@2.0.4
 - apollo-server-hapi@2.0.4
 - apollo-server-integration-testsuite@2.0.4
 - apollo-server-koa@2.0.4
 - apollo-server-lambda@2.0.4
 - apollo-server-micro@2.0.4
 - apollo-server@2.0.5
2018-08-20 14:17:37 -07:00