apollo-server/docs
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
..
assets Add additional docs files 2017-10-16 17:15:08 -07:00
sketch Apollo Server 2:Automatic Persisted Queries (#1149) 2018-06-11 15:44:20 -07:00
source Throw error at startup when file uploads are enabled on Node.js < 8.5.0. 2018-11-30 15:59:57 +02:00
.gitignore Start ignoring _redirects again, since it's dynamically generated. 2018-05-01 21:37:16 -07:00
.nvmrc [docs] Update Hexo dependencies for cross-repo consistency. (#815) 2018-02-28 13:22:07 +02:00
_config.yml Throw error at startup when file uploads are enabled on Node.js < 8.5.0. 2018-11-30 15:59:57 +02:00
package-lock.json chore(deps): update dependency chexo to v1.0.7 (#2039) 2018-11-28 23:55:06 +00:00
package.json chore(deps): update dependency chexo to v1.0.7 (#2039) 2018-11-28 23:55:06 +00:00
README.md bring version-2 up to date 2018-07-13 13:14:19 -07:00

Documentation

This is the documentation source for this repository.

The deployed version of the documentation for this repository is available at:

Documentation for the documentation

This README.md is intentionally short since the documentation for the documentation provides details for the documentation framework itself. Additional information should generally be added to that documentation rather than here in this README.md, in order to provide a centralized resource that benefits all documentation deployments.

Running locally

For more information, consult the documentation for the documentation, referenced above.

In general though:

  • npm install in this directory
  • npm start in this directory
  • Open a browser to the link provided in the console.

Important note: Changes to the markdown source does not result in an automatic "hot reload" in the browser; it is necessary to reload the page manually in the browser to see it re-rendered. Additionally, changes to _config.yml require stopping the server and restarting with npm start again.

Deploy previews

Documentation repositories should be setup with a "deploy preview" feature which automatically provides "preview" links in the status checks section of pull-requests.

In the event that it's not possible to run the documentation locally, pushing changes to the branch for a pull-request can be a suitable alternative that ensures changes to the documentation are properly rendered.