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.
These are docs to accompany the `apollo-server-testing` utils
<!--
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:
* [ ] Update CHANGELOG.md with your change (include reference to issue & this PR)
* [ ] Make sure all of the significant new logic is covered by tests
* [ ] Rebase your changes on master so that they can be merged easily
* [ ] Make sure all tests and linter rules pass
<!--**Pull Request Labels**
While not necessary, you can help organize our pull requests by labeling this issue when you open it. To add a label automatically, simply [x] mark the appropriate box below:
- [ ] feature
- [ ] blocking
- [x] docs
To add a label not listed above, simply place `/label another-label-name` on a line by itself.
-->
* change logging to metrics and add section on Engine
* add to the migration guide
* address feedback and add clarity around logFunction
* address feedback for migration guide
* core: return response object from runHttpQuery
* core: change gqlResponse to graphqlResponse and add custom RequestInit type
* core: add cache-control headers based on the calcualted maxAge
* core: add extensions check during cache-control header creation
* core: create headers when cacheControl is not enabled otherwise pass through extensions
* express: initial tests of CDN cach-contol headers
* core: fixed tests with applyMiddleware and pass cacheControl config
* core: cache hint fixes, ignore when no maxAge, and check for rootKeys
* core: check for hints of length 0
* core: node 10 fails file upload test for some stream reason
* docs: add cdn caching section to features
* add space after // in comments
* fix feedback: proxy alignment and response creation
Adds cache-control toggles for http header calculation and stripping out
the cache control extensions from the respose.
Brings the default calculation of headers in line with the proxy.
* fix links in comments
* fix tests with null dereference
* update cdn docs and migration guide to include latest cdn configuration
* add not for engine migration to set engine to false
* add engine set to false in migration guide
* express: fixed tests
* address feedback to use omit and documentation
* docs: cdn caching is alternative to full response caching
* add back epipe check in upload tests
* Enable declarationMap in tsconfig.json
See http://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html
* Add apollo-server-caching package and improve typings
* Remove superfluous test steps
* Add .npmignore to apollo-server-caching
* Add apollo-server-env and apollo-datasource-rest packages
* Fix broken imports
* Use prepublish instead of prepare
* cache is now passed to data sources from ApolloServer constructor
* fix Object.values to use the object passed in rather than this
* add initial datasource test
* docs: initial data source documentation
* docs: initial data source documentation
* compiles and documentation now highlights code in data-sources.md
* Some changes to the data source docs
We recommend the use of apollo-engine-reporting and the other built-in features
of AS 2.0 rather than engineProxy. You can still use the apollo-engine npm
module manually with AS 2.0, or stay on AS 1.0.
This uses `hexo-versioned-netlify-redirects`[0], a package I wrote just for
this purpose (on Meteor) a few months back.
With any luck, this will do the trick for Apollo too.
[0]: https://github.com/meteor/hexo-versioned-netlify-redirects
This should enable the dropdown box in the sidebar of the documentation.
Currently, that sidebar will be a terrible color, since it has never
appeared on Apollo documentation before and nobody has ever defined style on
it. That'll have to be fixed in the theme itself[0].
[0]: https://github.com/meteor/meteor-theme-hexo
* docs: simplify schema organization and add modularize schema advanced section
* docs: working around code snippets demonstating how to organize a large schema
* update headers to be h tags and capitalization
* docs: intro to each file in modularize schema and circular reference full type defs
* docs: schema modularization formatting
* docs: shorten wording around intros to code snippets
* Move modularization to organizaition
* docs: removed circular dependencies section from schema organization
* docs: copy initial stitching sections from graphql-tools
* docs: convert schema stitching introduction to use apollo-server
* docs: remote-schema shortened to contain links only
* docs: schema delegation shortened to remove api reference
* docs: rename schema-stitching to features
* Bury Best Practices, for the time being.
* Bury Schema, but leave it on disk.
* Introduce new Querying section.
* Move "Why Apollo Server?" into "Index".
* ...to be refined.
* Remove no-longer-helpful "Getting Started" from "Index".
cc @stubailo @evans @peggyrayzis @JakeDawkins @unicodeveloper @jbaxleyiii
This should enable the dropdown box in the sidebar of the documentation.
Currently, that sidebar will be a terrible color, since it has never
appeared on Apollo documentation before and nobody has ever defined style on
it. That'll have to be fixed in the theme itself[0].
[0]: https://github.com/meteor/meteor-theme-hexo