Skip to content

Commit

Permalink
Merge pull request #1 from livingmine/master
Browse files Browse the repository at this point in the history
Add support for lambda to upload file
  • Loading branch information
charleswong28 authored Feb 14, 2019
2 parents 935c849 + 37b2f30 commit bf8b1ad
Show file tree
Hide file tree
Showing 179 changed files with 6,353 additions and 3,836 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @martijnwalraven @abernix
30 changes: 0 additions & 30 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

10 changes: 0 additions & 10 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,3 @@ TODO:
* [ ] 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
- [ ] docs
To add a label not listed above, simply place `/label another-label-name` on a line by itself.
-->
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ junit.xml

# Node modules
node_modules/

# Mac OS
.DS_Store
75 changes: 74 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,83 @@
# Changelog

### vNEXT

- Fix [#1419](https://github.com/apollographql/apollo-server/issues/1419), [#1703](https://github.com/apollographql/apollo-server/issues/1703) file upload using lambda. [PR #1739](https://github.com/apollographql/apollo-server/pull/1739)

### v2.3.3

- `apollo-server` (only): Stop double-invocation of `serverWillStart` life-cycle event. (More specific integrations - e.g. Express, Koa, Hapi, etc. - were unaffected.) [PR #2239](https://github.com/apollographql/apollo-server/pull/2239)
- Avoid traversing `graphql-upload` module tree in run-time environments which aren't Node.js. [PR #2235](https://github.com/apollographql/apollo-server/pull/2235)

### v2.3.2

- Switch from `json-stable-stringify` to `fast-json-stable-stringify`. [PR #2065](https://github.com/apollographql/apollo-server/pull/2065)
- Fix cache hints of `maxAge: 0` to mean "uncachable". [#2197](https://github.com/apollographql/apollo-server/pull/2197)
- Apply `defaultMaxAge` to scalar fields on the root object. [#2210](https://github.com/apollographql/apollo-server/pull/2210)
- Don't write to the persisted query cache until execution will begin. [PR #2227](https://github.com/apollographql/apollo-server/pull/2227)

### v2.3.1

- Provide types for `graphql-upload` in a location where they can be accessed by TypeScript consumers of `apollo-server` packages. [ccf935f9](https://github.com/apollographql/apollo-server/commit/ccf935f9) [Issue #2092](https://github.com/apollographql/apollo-server/issues/2092)

### v2.3.0

- **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.**

For more information, see [PR #2054](https://github.com/apollographql/apollo-server/pull/2054) and [our documentation](https://www.apollographql.com/docs/apollo-server/v2/migration-file-uploads.html).

### v2.2.7

- `apollo-engine-reporting`: When multiple instances of `apollo-engine-reporting` are loaded (an uncommon edge case), ensure that `encodedTraces` are handled only once rather than once per loaded instance. [PR #2040](https://github.com/apollographql/apollo-server/pull/2040)

### v2.2.6

- `apollo-server-micro`: Set the `Content-type` to `text/html` for GraphQL Playground. [PR #2026](https://github.com/apollographql/apollo-server/pull/2026)

### v2.2.5

- Follow-up on the update to `graphql-playground-html` in previous release by also bumping the minor version of the `graphql-playground-react` dependency to `1.7.10` — which is the version requested from the from the CDN bundle by `graphql-playground-html`. [PR #2037](https://github.com/apollographql/apollo-server/pull/2037)

### v2.2.4

- Fix GraphQL Playground documentation scrolling bug in Safari by updating to latest (rebased) fork of `graphql-playground-html`. [PR #2037](https://github.com/apollographql/apollo-server/pull/2037)

### v2.2.3

- When `generateClientInfo` is not used to define the client name, client version and
client reference ID, Apollo Server will now default to the values present in the HTTP headers
of the request (`apollographql-client-name`, `apollographql-client-reference-id` and
`apollographql-client-version` respectively). As a last resort, when those headers are not set,
the query extensions' `clientInfo` values will be used. [PR #1960](https://github.com/apollographql/apollo-server/pull/1960)

### v2.2.2

- Fixed TypeScript 2.2 compatibility via updated `apollo-tooling` dependency. [Issue #1951](https://github.com/apollographql/apollo-server/issues/1951) [`26d6c739`](https://github.com/apollographql/apollo-server/commit/26d6c739505b3112694e641c272c748ce38ba86b)
- Throw a more specific error when asynchronous introspection query behavior is detected. [PR #1955](https://github.com/apollographql/apollo-server/pull/1955)

### v2.2.1

- Added support for an array of `modules` on the `ApolloServer` constructor options. Each element of the `modules` can point to a module which exports `typeDefs` and `resolvers`. These modules can be used in lieu of, or in combination with, directly specifying `schema` or `typeDefs`/`resolvers` on the constructor options. This provides greater modularity and improved organization for logic which might be limited to a specific service. [`8f6481e6`](https://github.com/apollographql/apollo-server/commit/8f6481e60f8418738f9ebbe9d5ab5e7e2ce4d319).
- Added `resolveObject` support to query execution. [`bb67584`](https://github.com/apollographql/apollo-server/commit/bb67584a224843a5b2509c2ebdd94e616fe6227c).
- Fix broken `apollo-server-cloud-functions` in 2.2.0 caused by missing TypeScript project references which resulted in the package not being published to npm in compiled form. [PR #1948](https://github.com/apollographql/apollo-server/pull/1948)

### v2.2.0

- New request pipeline, including support for plugins which can implement lifecycle hooks at various stages of a request. [PR #1795](https://github.com/apollographql/apollo-server/pull/1795).
- Introduce new `apollo-server-testing` utilities. [PR #1909](https://github.com/apollographql/apollo-server/pull/1909)
- Fix mocks configuration to allow disabling of mocks by using `mocks: false`, even if `mockEntireSchema` is `true`. [PR #1835](https://github.com/apollographql/apollo-server/pull/1835)
- Update `graphql-playground-html` to 1.7.8. [PR #1855](https://github.com/apollographql/apollo-server/pull/1855)
- Bring back Azure functions support [Issue #1752](https://github.com/apollographql/apollo-server/issue/1752) [PR #1753](https://github.com/apollographql/apollo-server/pull/1753)
- Allow an optional function to resolve the `rootValue`, passing the `DocumentNode` AST to determine the value. [PR #1555](https://github.com/apollographql/apollo-server/pull/1555)
- Follow-up on the work in [PR #1516](https://github.com/apollographql/apollo-server/pull/1516) to also fix missing insertion cursor/caret when a custom GraphQL configuration is specified which doesn't specify its own `cursorShape` property. [PR #1607](https://github.com/apollographql/apollo-server/pull/1607)
- Azure functions support [Issue #1752](https://github.com/apollographql/apollo-server/issue/1752) [PR #1753](https://github.com/apollographql/apollo-server/pull/1753) [PR #1948](https://github.com/apollographql/apollo-server/pull/1948)
- Allow JSON parsing in `RESTDataSource` of Content Type `application/hal+json`. [PR #185](https://github.com/apollographql/apollo-server/pull/1853)
- Add support for a `requestAgent` configuration parameter within the `engine` configuration. This can be utilized when a proxy is necessary to transmit tracing and metrics data to Apollo Engine. It accepts either an [`http.Agent`](https://nodejs.org/docs/latest-v8.x/api/http.html#http_class_http_agent) or [`https.Agent`](https://nodejs.org/docs/latest-v8.x/api/https.html#https_class_https_agent) and behaves the same as the `agent` parameter to Node.js' [`http.request`](https://nodejs.org/docs/latest-v8.x/api/http.html#http_http_request_options_callback). [PR #1879](https://github.com/apollographql/apollo-server/pull/1879)

### v2.1.0

Expand Down
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ server.listen().then(({ url }) => {

## Integrations

Often times, Apollo Server needs to be run with a particular integration. To start, run `npm install --save apollo-server-<integration>` where `<integration>` is one of the following:
Often times, Apollo Server needs to be run with a particular integration. To start, run `npm install --save apollo-server-<integration>` where `apollo-server-<integration>` is one of the following:

- `express`
- `koa`
- `hapi`
- `lambda`
- `cloudflare`

If a framework is not on this list and it should be supported, please open a PR.
- `apollo-server-express`
- `apollo-server-koa`
- `apollo-server-hapi`
- `apollo-server-lambda`
- `apollo-server-azure-functions`
- `apollo-server-cloud-functions`
- `apollo-server-cloudflare`

### Express

Expand Down Expand Up @@ -149,7 +149,7 @@ const server = new ApolloServer({ typeDefs, resolvers });
const app = connect();
const path = '/graphql';

server.use(query());
app.use(query());
server.applyMiddleware({ app, path });

const port = 4000;
Expand All @@ -164,7 +164,7 @@ app.listen({ port }, () =>
### Koa

```js
const koa = require('koa');
const Koa = require('koa');
const { ApolloServer, gql } = require('apollo-server-koa');

// Construct a schema, using GraphQL schema language
Expand Down Expand Up @@ -283,3 +283,8 @@ npm link
cd ~/myApp
npm link apollo-server-<integration>
```

## Maintainers

- [@martijnwalraven](https://github.com/martijnwalraven) (Apollo)
- [@abernix](https://github.com/abernix) (Apollo)
3 changes: 3 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
coverage:
status:
project:
default:
threshold: 1%
patch:
default:
# We should raise this, but we want to evaluate how
Expand Down
21 changes: 4 additions & 17 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ sidebar_categories:
- features/unions-interfaces
- features/directives
- features/creating-directives
- features/authentication
- features/testing
# Schema stitching:
# - features/schema-stitching
# - features/remote-schemas
Expand All @@ -35,21 +37,14 @@ sidebar_categories:
- deployment/heroku
- deployment/lambda
- deployment/now
Related Guides:
- title: Monitoring
href: https://www.apollographql.com/docs/guides/monitoring.html
- title: Versioning
href: https://www.apollographql.com/docs/guides/versioning.html
- title: Access Control
href: https://www.apollographql.com/docs/guides/access-control.html
- title: Security
href: https://www.apollographql.com/docs/guides/security.html

API Reference:
- api/apollo-server
- api/graphql-tools
Migration:
- migration-two-dot
- migration-engine
- migration-file-uploads

github_repo: apollographql/apollo-server
content_root: docs/source
Expand All @@ -62,13 +57,5 @@ root: /docs/apollo-server/

public_dir: public/docs/apollo-server

redirects:
/docs/apollo-server/v2/features/cdn.html:
docs/guides/performance
/docs/apollo-server/v2/features/apq.html:
docs/guides/performance
/docs/apollo-server/v2/features/file-uploads.html:
docs/guides/file-uploads

versioned-netlify-redirects:
netlify_site_id: apollo-server-docs
Loading

0 comments on commit bf8b1ad

Please sign in to comment.