Commit graph

2812 commits

Author SHA1 Message Date
renovate[bot]
e179d8a1c0
chore(deps): update dependency apollo-link to v1.2.5 (#2096) 2018-12-14 06:27:22 +00:00
renovate[bot]
9fe5b853a6
chore(deps): update dependency @types/node to v10.12.15 (#2095) 2018-12-14 05:34:03 +00:00
renovate[bot]
e948c6f8ef
chore(deps): update dependency @types/hapi to v17.8.1 (#2094) 2018-12-14 04:30:06 +00:00
Jesse Rosenberger
cf95cf7881
Publish
- apollo-server-azure-functions@2.3.1
 - apollo-server-cloud-functions@2.3.1
 - apollo-server-cloudflare@2.3.1
 - apollo-server-core@2.3.1
 - apollo-server-express@2.3.1
 - apollo-server-hapi@2.3.1
 - apollo-server-integration-testsuite@2.3.1
 - apollo-server-koa@2.3.1
 - apollo-server-lambda@2.3.1
 - apollo-server-micro@2.3.1
 - apollo-server-plugin-base@0.2.1
 - apollo-server-testing@2.3.1
 - apollo-server@2.3.1
 - graphql-extensions@0.4.1
2018-12-13 21:07:29 +02:00
Jesse Rosenberger
27e98a5598
Update CHANGELOG.md prior to releasing v2.3.1.
Closes: https://github.com/apollographql/apollo-server/issues/2092
Fixed by: ccf935f976
2018-12-13 20:55:55 +02:00
Martijn Walraven
ccf935f976 Move graphql-upload types to core package and add reference 2018-12-13 19:34:44 +01:00
Jesse Rosenberger
34322a6523
tests: Use an empty subscriptionsPath when asserting subscriptions eq false.
This fixes a TypeScript `TypeError` which was encountered after the
`@types/ws` typings were updated[[1]] to more correctly identify valid URLs.

The error exhibited on CI[[2] was:

TypeError [ERR_INVALID_URL]: Invalid URL: ws://localhost:6666undefined

This had been previously reverted[[3]] but was auto-merged again for a
reason I don't quite have time to investigate right now, though I suspect
it's something I'll be able to prevent in the future with a bit more care.

[1]: https://github.com/apollographql/apollo-server/pull/1992
[2]: https://circleci.com/gh/apollographql/apollo-server/22416
[3]: https://github.com/apollographql/apollo-server/pull/2006

cc @martijnwalraven
2018-12-13 16:38:22 +02:00
Jesse Rosenberger
71dff3e336
Revert "Revert "chore(deps): update dependency ws to v6.1.2 (#1992)""
This reverts commit 5e09e8a97a.
2018-12-13 16:35:28 +02:00
Kornel Dubieniecki
c03fe79e33 Make gql example consistent and easier to read (#2087)
Hey guys,
I've noticed that some of the gql examples are indented differently than the rest and I think that consistent indentation and formatting makes it easier to read and comprehend.
Let me know what you think, thanks.
2018-12-13 15:55:04 +02:00
Jesse Rosenberger
3fea8033b4
Merge branch 'master' into release-vNEXT 2018-12-13 15:33:53 +02:00
Jesse Rosenberger
3545c32e2a
Publish
- apollo-cache-control@0.4.0
 - apollo-engine-reporting-protobuf@0.2.0
 - apollo-engine-reporting@0.2.0
 - apollo-server-azure-functions@2.3.0
 - apollo-server-cloud-functions@2.3.0
 - apollo-server-cloudflare@2.3.0
 - apollo-server-core@2.3.0
 - apollo-server-express@2.3.0
 - apollo-server-hapi@2.3.0
 - apollo-server-integration-testsuite@2.3.0
 - apollo-server-koa@2.3.0
 - apollo-server-lambda@2.3.0
 - apollo-server-micro@2.3.0
 - apollo-server-plugin-base@0.2.0
 - apollo-server-testing@2.3.0
 - apollo-server@2.3.0
 - apollo-tracing@0.4.0
 - graphql-extensions@0.4.0
2018-12-13 15:29:53 +02:00
Jesse Rosenberger
522cd6bf75
Update CHANGELOG.md for 2.3.0 release.
Also removes inadvertent 2.2.7-alpha.0 leftover from merge.
2018-12-13 15:28:12 +02:00
Jesse Rosenberger
ad42402954
Merge branch 'release-vNEXT' 2018-12-13 15:26:32 +02:00
Jesse Rosenberger
5e09e8a97a
Revert "chore(deps): update dependency ws to v6.1.2 (#1992)"
This reverts commit 36ac4e4b79.
2018-12-13 15:23:06 +02:00
renovate[bot]
36ac4e4b79
chore(deps): update dependency ws to v6.1.2 (#1992) 2018-12-13 13:10:49 +00:00
Jesse Rosenberger
d7e7834633
Publish
- apollo-cache-control@0.3.4
 - apollo-engine-reporting-protobuf@0.1.1
 - apollo-engine-reporting@0.1.4
 - apollo-server-azure-functions@2.2.7
 - apollo-server-cloud-functions@2.2.7
 - apollo-server-cloudflare@2.2.7
 - apollo-server-core@2.2.7
 - apollo-server-express@2.2.7
 - apollo-server-hapi@2.2.7
 - apollo-server-integration-testsuite@2.2.7
 - apollo-server-koa@2.2.7
 - apollo-server-lambda@2.2.7
 - apollo-server-micro@2.2.7
 - apollo-server-plugin-base@0.1.7
 - apollo-server-testing@2.2.7
 - apollo-server@2.2.7
 - apollo-tracing@0.3.4
 - graphql-extensions@0.3.7
2018-12-13 15:02:16 +02:00
Jesse Rosenberger
458b4f192d
Merge branch 'release-2.2.7' 2018-12-13 14:54:40 +02:00
Jesse Rosenberger
b9f01c45a5
Update CHANGELOG.md for 2.2.7 release. 2018-12-13 14:52:28 +02:00
renovate[bot]
44aebe49d9
chore(deps): update dependency @types/node to v10.12.14 (#2091) 2018-12-13 04:27:54 +00:00
renovate[bot]
2b67ae882e
chore(deps): update dependency lerna to v3.6.0 (#2076) 2018-12-08 05:45:12 +00:00
renovate[bot]
1a796c30e1
chore(deps): update dependency typescript to v3.2.2 (#2073) 2018-12-07 08:40:34 +00:00
renovate[bot]
cfd531c3bc
chore(deps): update dependency redis-mock to v0.41.0 (#2072) 2018-12-07 07:24:47 +00:00
renovate[bot]
3e64994d61
chore(deps): update dependency meteor-promise to v0.8.7 (#2071) 2018-12-07 06:56:52 +00:00
Jesse Rosenberger
4b1894c3d2
Update renovate.json
Per the log output on https://renovatebot.com/dashboard#github/apollographql/apollo-server/31879651
2018-12-05 17:53:45 +02:00
renovate[bot]
d6fcaed545
chore(deps): update dependency @types/lodash to v4.14.119 (#2066) 2018-12-05 06:41:00 +00:00
Jesse Rosenberger
ef31818629
Publish
- apollo-cache-control@0.4.0-alpha.0
 - apollo-engine-reporting-protobuf@0.2.0-alpha.0
 - apollo-engine-reporting@0.2.0-alpha.0
 - apollo-server-azure-functions@2.3.0-alpha.0
 - apollo-server-cloud-functions@2.3.0-alpha.0
 - apollo-server-cloudflare@2.3.0-alpha.0
 - apollo-server-core@2.3.0-alpha.0
 - apollo-server-express@2.3.0-alpha.0
 - apollo-server-hapi@2.3.0-alpha.0
 - apollo-server-integration-testsuite@2.3.0-alpha.0
 - apollo-server-koa@2.3.0-alpha.0
 - apollo-server-lambda@2.3.0-alpha.0
 - apollo-server-micro@2.3.0-alpha.0
 - apollo-server-plugin-base@0.2.0-alpha.0
 - apollo-server-testing@2.3.0-alpha.0
 - apollo-server@2.3.0-alpha.0
 - apollo-tracing@0.4.0-alpha.0
 - graphql-extensions@0.4.0-alpha.0
2018-12-04 21:12:30 +02:00
Jesse Rosenberger
b5c516c04d
Merge pull request #2054 from apollographql/abernix/throw-when-uploads-on-pre-node-8.5
Upgrade to graphql-upload v8, dropping upload support for Node.js v6.
2018-12-04 14:30:26 +02:00
Jesse Rosenberger
abb8dc58de
Merge branch 'release-vNEXT' into abernix/throw-when-uploads-on-pre-node-8.5 2018-12-04 14:07:57 +02:00
Jesse Rosenberger
3e64438263
Merge branch 'release-2.2.7' into release-vNEXT 2018-12-04 14:06:41 +02:00
Jesse Rosenberger
ccf0aa5476
Publish
- apollo-cache-control@0.3.4-alpha.0
 - apollo-engine-reporting-protobuf@0.1.1-alpha.0
 - apollo-engine-reporting@0.1.4-alpha.0
 - apollo-server-azure-functions@2.2.7-alpha.0
 - apollo-server-cloud-functions@2.2.7-alpha.0
 - apollo-server-cloudflare@2.2.7-alpha.0
 - apollo-server-core@2.2.7-alpha.0
 - apollo-server-express@2.2.7-alpha.0
 - apollo-server-hapi@2.2.7-alpha.0
 - apollo-server-integration-testsuite@2.2.7-alpha.0
 - apollo-server-koa@2.2.7-alpha.0
 - apollo-server-lambda@2.2.7-alpha.0
 - apollo-server-micro@2.2.7-alpha.0
 - apollo-server-plugin-base@0.1.7-alpha.0
 - apollo-server-testing@2.2.7-alpha.0
 - apollo-server@2.2.7-alpha.0
 - apollo-tracing@0.3.4-alpha.0
 - graphql-extensions@0.3.7-alpha.0
2018-12-04 13:44:00 +02:00
Jesse Rosenberger
820b3bdfc5
Update CHANGELOG.md for 2.2.7-alpha.0. 2018-12-04 13:42:39 +02:00
Jesse Rosenberger
5497fb2775
Merge branch 'abernix/prepare-2-2-6' 2018-12-04 13:37:04 +02:00
Jesse Rosenberger
1e5cdc6397
Publish
- apollo-server-azure-functions@2.2.6
 - apollo-server-cloud-functions@2.2.6
 - apollo-server-cloudflare@2.2.6
 - apollo-server-core@2.2.6
 - apollo-server-express@2.2.6
 - apollo-server-hapi@2.2.6
 - apollo-server-integration-testsuite@2.2.6
 - apollo-server-koa@2.2.6
 - apollo-server-lambda@2.2.6
 - apollo-server-micro@2.2.6
 - apollo-server-plugin-base@0.1.6
 - apollo-server-testing@2.2.6
 - apollo-server@2.2.6
 - graphql-extensions@0.3.6
2018-12-04 13:35:23 +02:00
Jesse Rosenberger
7468f4ff8a
Prepare CHANGELOG.md for v2.2.6. 2018-12-04 12:10:02 +02:00
Evans Hauser
38bf09b316 (engine-reporting) Include encodedTraces only once. (#2040)
* AER: Remove encodedTraces to prevent duplicates

When there are multiple instances of apollo-engine-reporting, the
`Trace.encode` method gets wrapped each time to add the
`encodedTraces`. In order to prevent them from being added to the
protobuf multiple times, we remove the encodedTraces after adding them
once

* Add changelog

* Move incremental Trace encoding to a-e-r-protobuf

To enable incrmental compilation of traces, we add a patch to the
Trace.encode method generated by protobujs to accept and store encoded
traces. Occassionally with multiple instances of apollo-engine-reporting
that share the same version of the protobuf, the wrapper method gets
applied more than once. In order to ensure that the wrapper only gets
applied once, we patch the Trace.encode method inside of
apollo-engine-protobuf.

tsc hangs on the processing the generated protobuf.js files, so the
tsconfig.json ignores the generated protobuf file. In order for the
typescript index.ts file to compile the generated protobuf.js file is
output to the src folder. To ensure the protobuf files are available to
the production build, `npm run compile` copies the protobuf file
manually from src to dist.

* Reexport protobuf import after modification

`export * from './protobuf'` exports the unmodified reference

* Update comment on Trace.encode to point at a-e-r-p

The override now occurs inside of apollo-engine-reporting-protobuf due
to the case of having multiple reporting challenges, so we need to
update the comments to help indicate that

* Remove typescript build step

In order to simplify the generation of this library, we move the change
the index.ts file into index.js and remove the typescript build step.
Since the type safety is created by the protobufjs generation, this
seems acceptable. In general this portion of the code should remain
relatively stable, so generating and copying the code with `prepare`
remains reasonable.
2018-12-04 12:06:08 +02:00
renovate[bot]
7d06263380
chore(deps): update dependency @types/node to v10.12.12 (#2061) 2018-12-04 07:26:19 +00:00
Jesse Rosenberger
fe2d5972c0
Update ApolloServer.ts 2018-12-03 14:08:40 +02:00
Jesse Rosenberger
363472c87f
Update migration-file-uploads.md 2018-12-03 14:01:28 +02:00
Jesse Rosenberger
8a58e9f4ce
Update CHANGELOG.md 2018-12-03 14:01:15 +02:00
renovate[bot]
ae69675aaa
chore(deps): update dependency @types/node to v10.12.11 (#2057) 2018-12-01 05:53:13 +00:00
Jesse Rosenberger
705256e879
(tests): Re-enable file upload tests for Node.js 10. 🎉🎉🎉
This commit again looks quite complicated, but's merely an over-complication
inflicted by Prettification.  Disabling whitespace differences when viewing
this commit, the functional change here is that we no longer skip many file
upload tests when the (semver) major segment of `process.version` is `10`.

I couldn't be happier to get rid of this exception for file upload tests on
Node.js 10, which was an unfortunate reality of the non-updated
`graphql-upload` module world we previously lived in.

Thanks, @jaydenseric, for the newfound (to us!) Node.js upload support!
2018-11-30 19:41:30 +02:00
Jesse Rosenberger
cd6e575bb7
(tests) Skip file upload tests for NODE_MAJOR_VERSION === 6.
This commit looks way more complicated than it really is thanks to Prettier
trying to be helpful.

All I've done is add `NODE_MAJOR_VERSION === 6` as a version NOT to test
uploads for, in an effort to fix the failing tests (failing appropriately
since Node.js 6 with file uploads throws an error right now and cannot run
uploads anymore.).
2018-11-30 19:04:51 +02:00
Jesse Rosenberger
6dc132e0c6
(tests) Switch to a very explicit Node.js 10 restriction.
I hope to actually remove this limitation, but I'm going to iterate on it
first.  This also just switches to a `NODE_MAJOR_VERSION` constant from the
`apollo-server-integration-testsuite` rather than using the GTE function on
the same input since...math.
2018-11-30 19:00:55 +02:00
Jamie Hodge
bcabbb7785 set content type to text/html for playground (#2026)
BUGFIX: the playground page is currently being served without a content type

<!--
  Thanks for filing a pull request on GraphQL Server!

  Please look at the following checklist to ensure that your PR
  can be accepted quickly:
-->

TODO:

* [x] Update CHANGELOG.md with your change (include reference to issue & this PR)
* [ ] Make sure all of the significant new logic is covered by tests
* [x] Rebase your changes on master so that they can be merged easily
* [x] Make sure all tests and linter rules pass
2018-11-30 18:58:42 +02:00
Jesse Rosenberger
2fd56f0c3e
Don't enable uploads when using an unsupported Node.js in tests.
Now that there are specific versions of Node.js which don't support file
uploads (namely, <= 8.5.0) we need to explicitly disable uploads on those
versions, similar to how those users must opt-in to that behavior by setting
`uploads: false` in their Apollo Server constructor options.

This effectively accomplishes exactly that, but only when necessary.
2018-11-30 18:50:23 +02:00
Ben Iofel
d744c227ac remove .DS_Store (#2055) 2018-11-30 18:43:01 +02:00
Jesse Rosenberger
7e6d6cf13b
Update to graphql-upload@8.0.2. 2018-11-30 18:07:42 +02:00
Jesse Rosenberger
9c563fae50
Throw error at startup when file uploads are enabled on Node.js < 8.5.0.
Due to changes in the third-party `graphql-upload` package which Apollo
Server utilizes to implement out-of-the-box file upload functionality, we
must drop support for file uploads in versions of the Node.js engine prior
to v8.5.0.  Since file uploads are supported by default in Apollo Server 2.x,
and there is an explicit dependency on `graphql-upload`, we must
prevent users who are affected by this mid-major-release deprecation by
being surprised by the sudden lack of upload support.

By `throw`-ing an error at server startup for affected users, we certainly
are breaking a semantic versioning agreement for these users, however with a
relatively simple ergonomic (setting `uploads: false`) we allow those users
who are NOT utilizing file uploads (as we believe is the case with a
majority) to continue using their version of Node.js until it reaches the
end of its supported lifetime (as dictated by its Long Term Support
agreement with the Node.js Foundation).  If we did not `throw` the error at
server start-up, those affected may not notice since they may update and start
their updated server without noticing the impending chance of failure when
someone tries updating!

Apollo Server 2.x has attempted to maintain full compatibility with versions
of Node.js which are still under Long Term Support agreements with the
Node.js Foundation.  While this continues to mostly be true, file uploads
are an exception which we've now had to make.

Third-party open-source projects must absolutely do what's best for their
project.  From an architecture standpoint, I suspect that we (the designers
behind Apollo Server) are mostly to blame for this.  Namely, it's unfortunate
that we had made such an incredibly coupled integration with a third-party
package that we restricted our users from incrementally adopting the
changes (and new/improved functionality) of, in this particular case,
the `graphql-upload` package.  I hope we can take better care with decisions
like this in the future!

Lastly, this commit also adds documentation to help those affected.
2018-11-30 15:59:57 +02:00
Leonardo Gatica
0c2fbc3dec
feat(uploads): replace apollo-upload-server v5 with graphql-upload v8 2018-11-30 15:45:01 +02:00
renovate[bot]
ddabd659d9
chore(deps): update dependency typescript to v3.2.1 (#2050) 2018-11-30 08:00:07 +00:00