* apollo-server-core: add file upload hooks and configuration
* apollo-server-core: make requestOptions and fileUploadsConfig public fields in ApolloServerBase
* apollo-server-express: initial fileuploads middleware
* apollo-server-hapi: initial file uploads middleware
* core: remove fileuploads from constructor and add merge capabilities
* express: add fileuploads to registerServer and single test
* hapi: add fileuploads schema merge to registerServer
* express: add check for EPIPE and ignore it due to upload server issue
* core: add scalar Upload to server construction
This change was introduced by the changes in apollographql/apollo-server#802
but first showed its head in apollographql/apollo-server#908. The reason that
violations in new type definitions aren't being found until subsequent PRs
isn't entirely clear but, ignoring that CI-related annoyance, the problem
itself here is very concrete.
It traces back to a major version update to `@types/mocha` via [Exhibit A],
which makes it unacceptable to return anything besides a `Promise` or
_nothing_ from a Mocha test factory.
I agree with this change in principle, since generally speaking there can be
multiple `expect` statements in each test and there is no particular reason
that the last one's value should be getting returned as Mocha doesn't do
anything functional with it.
More than anything, this seems like an artifact of an ESLint rule which
mandated that the last value in a function be returned, à la CoffeeScript or
other languages.
This will fix the failing tests on apollographql/apollo-server#908 and other
PRs currently in-flight.
Exhibit A: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24301
As originally reported in [0], this should make debugging performance issues
easier, since the name of the function will be properly displayed/shown in
flame-graphs.
[0]: https://github.com/apollographql/apollo-server/pull/827
There were many missing releases and bullet points as well as inaccurate
ones. For example, it was impossible to figure out that users of Hapi 16 who
want to use Apollo Cache Control needed to use precisely version 1.2.0 of
apollo-server-hapi (which wasn't even mentioned).
Link to CHANGELOG from all READMEs. Add READMEs for the graphql-server-*
packages. Add an explanation of our versioning system to the top of
CHANGELOG.md.
* Export `GraphQLOptions` type directly from `apollo-server-express`.
Directly export `GraphQLOptions` from the `apollo-server-express` (and
synonymously, `graphql-server-express`) main module, rather than exporting
it only from `./expressApollo`.
For reasons unbeknownst to me, the changes below were only being complained
about in the CI environment but _not_ when I ran `npm run lint` locally.
It seems partially related to the OS its ran on, so I imagine there might be
some other sub-dependency at play here. In an effort to fix this, I just
spawned a Ubuntu docker image, checked out this repository and ran the same
`npm run lint`. This produced identical results to Travis, so I ran
`npm run lint-fix`, then saved the `git diff` results and have applied this
locally.
This should allow us to re-enable `prettier` in CI, though I have plans to
separate that from the actual `npm test` runs. This should result in a better
workflow for managing PRs.