Skip to content

Commit

Permalink
Merge branch 'release-vNEXT'
Browse files Browse the repository at this point in the history
  • Loading branch information
abernix committed Dec 13, 2018
2 parents 5e09e8a + ef31818 commit ad42402
Show file tree
Hide file tree
Showing 40 changed files with 331 additions and 200 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Changelog

### vNEXT
### v2.3.0-alpha

- **BREAKING FOR NODE.JS <= 8.5.0 ONLY**: To continue using Apollo Server 2.x in versions of Node.js prior to v8.5.0, file uploads must be disabled by setting `uploads: false` on the `ApolloServer` constructor options. Without explicitly disabling file-uploads, the server will `throw` at launch (with instructions and a link to our documentation).

This early deprecation is due to changes in the third-party `graphql-upload` package which Apollo Server utilizes to implement out-of-the-box file upload functionality. While, in general, Apollo Server 2.x aims to support all Node.js versions which were under an LTS policy at the time of its release, we felt this required an exception. By `throw`-ing when `uploads` is not explicitly set to `false`, we aim to make it clear immediately (rather than surprisingly) that this deprecation has taken effect.

While Node.js 6.x is covered by a [Long Term Support agreement by the Node.js Foundation](https://github.com/nodejs/Release#release-schedule) until April 2019, there are substantial performance (e.g. [V8](https://v8.dev/) improvements) and language changes (e.g. "modern" ECMAScript support) offered by newer Node.js engines (e.g. 8.x, 10.x). We encourage _all users_ of Apollo Server to update to newer LTS versions of Node.js prior to the "end-of-life" dates for their current server version.

**We intend to drop support for Node.js 6.x in the next major version of Apollo Server.**

### v2.2.7-beta.0

### v2.2.7

Expand Down
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ sidebar_categories:
Migration:
- migration-two-dot
- migration-engine
- migration-file-uploads

github_repo: apollographql/apollo-server
content_root: docs/source
Expand Down
29 changes: 29 additions & 0 deletions docs/source/migration-file-uploads.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: File uploads in Node.js < v8.5.0
---

File uploads are supported in Apollo Server 2.x through the third-party [`graphql-upload`](https://npm.im/graphql-upload/) package. While Apollo Server 2.x aims to support Node.js LTS versions prior to v8.5.0, the `graphql-upload` project no longer supports file uploads on versions of Node.js prior to v8.5.0 due to changes in the underlying architecture.

While Node.js versions prior to v8.5.0 are still under [_Long Term Support_ (LTS) agreements](https://github.com/nodejs/Release#release-schedule) from the Node.js Foundation, **we encourage _all users_ of Apollo Server to update to newer LTS versions of Node.js** prior to the "end-of-life" dates for their current server version.

For example, while Node.js 6.x is covered by Long Term Support until April 2019, there are substantial performance (e.g. [V8](https://v8.dev/) improvements) and language changes (e.g. "modern" ECMAScript support) offered by newer Node.js engines (e.g. 8.x, 10.x). Switching to newer Long Term Support versions of Node.js comes with long-term benefits; Node.js 10.x LTS releases are covered by the Node.js Foundation through April 2021.

Since file upload support for Node.js versions prior to v8.5.0 is no longer offered by `graphql-upload`, users of those versions must disable file uploads to continue using newer Apollo Server 2.x versions.

**To disable file uploads and continue using Apollo Server 2.x on Node.js 6.x**, add the `uploads: false` setting to the options when constructing the server. For example:

```js
const { typeDefs, resolvers } = require('./anOutsideDependency');
const server = new ApolloServer({
/* Existing Apollo Server settings — e.g. type definitions */
typeDefs,
resolvers,

/* Add this line to disable upload support! */
uploads: false,

/* ... other Apollo Server settings ... */
})
```

For additional assistance, please [search for existing issues](https://github.com/apollographql/apollo-server/issues?q=uploads) or file a [new issue](https://github.com/apollographql/apollo-server/issues/new) on the Apollo Server GitHub repository.
2 changes: 1 addition & 1 deletion docs/source/whats-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ const resolvers = {
Mutation: {
singleUpload: (parent, args) => {
return args.file.then(file => {
//Contents of Upload scalar: https://github.com/jaydenseric/apollo-upload-server#upload-scalar
//Contents of Upload scalar: https://github.com/jaydenseric/graphql-upload#class-graphqlupload
//file.stream is a node stream that contains the contents of the uploaded file
//node stream api: https://nodejs.org/api/stream.html
return file;
Expand Down
131 changes: 55 additions & 76 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/apollo-cache-control/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apollo-cache-control",
"version": "0.3.4",
"version": "0.4.0-alpha.0",
"description": "A GraphQL extension for cache control",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-engine-reporting-protobuf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apollo-engine-reporting-protobuf",
"version": "0.1.1",
"version": "0.2.0-alpha.0",
"description": "Protobuf format for Apollo Engine",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-engine-reporting/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apollo-engine-reporting",
"version": "0.1.4",
"version": "0.2.0-alpha.0",
"description": "Send reports about your GraphQL services to Apollo Engine",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-azure-functions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apollo-server-azure-functions",
"version": "2.2.7",
"version": "2.3.0-alpha.0",
"description": "Production-ready Node.js GraphQL server for Azure Functions",
"keywords": [
"GraphQL",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-cloud-functions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apollo-server-cloud-functions",
"version": "2.2.7",
"version": "2.3.0-alpha.0",
"description": "Production-ready Node.js GraphQL server for Google Cloud Functions",
"keywords": [
"GraphQL",
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-cloudflare/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apollo-server-cloudflare",
"version": "2.2.7",
"version": "2.3.0-alpha.0",
"description": "Production-ready Node.js GraphQL server for Cloudflare workers",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/apollo-server-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apollo-server-core",
"version": "2.2.7",
"version": "2.3.0-alpha.0",
"description": "Core engine for Apollo GraphQL server",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -25,7 +25,6 @@
},
"dependencies": {
"@apollographql/apollo-tools": "^0.2.6",
"@apollographql/apollo-upload-server": "^5.0.3",
"@apollographql/graphql-playground-html": "^1.6.6",
"@types/ws": "^6.0.0",
"apollo-cache-control": "file:../apollo-cache-control",
Expand All @@ -40,6 +39,7 @@
"graphql-subscriptions": "^1.0.0",
"graphql-tag": "^2.9.2",
"graphql-tools": "^4.0.0",
"graphql-upload": "^8.0.2",
"json-stable-stringify": "^1.0.1",
"lodash": "^4.17.10",
"subscriptions-transport-ws": "^0.9.11",
Expand Down
Loading

0 comments on commit ad42402

Please sign in to comment.