Commit graph

103 commits

Author SHA1 Message Date
Evans Hauser
5412885cc0
apollo-server 2: uploads as schema enhancement fulfilled in registerServer (#1071)
* 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
2018-05-29 15:58:52 -07:00
Evans Hauser
43d545f8ab
apollo-server-core: add request object to runHttpQuery for access to headers (#1096) 2018-05-24 15:43:17 -07:00
Evans Hauser
5b98a075b8
apollo-server-express: move import of apollo-server in tests to a require 2018-05-24 14:27:06 -07:00
Evans Hauser
9342658ac8
apollo-server-express: remove circular devDependeny on apollo-server for tests 2018-05-24 14:14:36 -07:00
Evans Hauser
f1fa8ade8a
apollo-server-express: tests constructor, registerServer options, and basic queries 2018-05-23 23:09:17 -07:00
Evans Hauser
1f784636d9
apollo-server: move health check into variant's registerServer call 2018-05-22 21:58:37 -07:00
Evans Hauser
712a562858
package.json: beta.2 for apollo-server, beta.1 for core/express, beta.0 for hapi 2018-05-22 11:16:59 -07:00
Evans Hauser
84e763358e
package.json: remove node and graphql types from root and unnecessary variants 2018-05-21 15:31:57 -07:00
Evans Hauser
072aef410b
tsconfig: remove typeRoots from tsconfig and automatic retreival of node types 2018-05-21 15:29:37 -07:00
Evans Hauser
138a0b55f2
build: readd @types/node and type configuration for tsconfig 2018-05-20 21:05:11 -07:00
Evans Hauser
aad7c39001
build: update dependencies and remove extra node typings 2018-05-20 03:52:54 -07:00
Evans Hauser
0e4848d5e1
apollo-server: subscriptions options condensed to on option and ensure subscriptions path is set 2018-05-11 17:30:52 -07:00
Evans Hauser
db47867ccb
apollo-server-core: move subscriptions out of constructor into listen function 2018-05-11 15:54:24 -07:00
Evans Hauser
d08f862063
apollo-server-express: add bodyParserConfig option to the listen method to configure bodyParser 2018-05-11 15:54:23 -07:00
Evans Hauser
7dee30095e
apollo-server-express: fix tests to include error code 2018-05-11 15:53:18 -07:00
James Baxley
aaac1c8ff8
initial full beta 2018-05-11 15:53:16 -07:00
James Baxley
a55336598c
cloudflare 2018-05-11 15:53:14 -07:00
James Baxley
68dec79529
clean up and move pieces around 2018-05-11 15:53:14 -07:00
Evans Hauser
541476f3be
accept non application/json for simple get requests with ?query= 2018-05-11 15:53:11 -07:00
Evans Hauser
05fd515d5c
default apollo-server offers graphiql at all endpoints if request not application/json 2018-05-11 15:53:11 -07:00
Evans Hauser
cb09fef524
Errors: latest codes and add exports to the apollo-server package 2018-05-11 15:53:10 -07:00
Evans Hauser
0e68e2ec4f
errors: send stack in debug, codes, make ApolloErrors 2018-05-11 15:53:07 -07:00
Renovate Bot
d8fecdc5c8 chore(deps): update dependency @types/body-parser to v1.17.0 2018-04-25 08:02:19 +00:00
David Glasser
b32e89c060 v1.3.6 2018-04-24 11:35:14 -07:00
Jesse Rosenberger
9d0e7b6866
v1.3.5 2018-04-18 16:10:04 +03:00
Jesse Rosenberger
0a103ef5bd
Stop violating types by returning assertions from Mocha tests. (#972)
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
2018-04-18 15:37:47 +03:00
Jesse Rosenberger
f8ca710279 Use named arrow functions for all middlewares, including GraphiQL.
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
2018-04-18 10:41:04 +03:00
Olivier Tassinari
e5e543b125 Use a named function for the middleware over an anonymous
It's making the investigation of performance issues easier.
2018-04-18 10:41:04 +03:00
Renovate Bot
38be32b4fc chore(deps): update dependency @types/connect to v3.4.32 2018-04-17 07:21:05 +00:00
Jesse Rosenberger
c2bba6b867
Convert Buffer.byteLength to string before assigning to Content-Length. (#956)
This change seems necessary in order to meet the new type definitions for
`res.setHeader` which mandate that the argument be a string, or an array of
strings.  Those type definitions were introduced via the `@types/node@9`
series of typing updates provided in [0], [1], [2].

With any luck, this will fix the failures being exhibited in CircleCI
tests[3] after we landed those typing updates.

[0]: https://github.com/apollographql/apollo-server/pull/907
[1]: https://github.com/apollographql/apollo-server/pull/927
[2]: https://github.com/apollographql/apollo-server/pull/939
[3]: https://circleci.com/gh/apollographql/apollo-server/1587
2018-04-11 11:17:55 +03:00
David Glasser
d4751e2f04 Update status badges for Circle correctly 2018-03-28 14:03:32 -07:00
David Glasser
80bce88b5b Update status badges for Circle 2018-03-28 14:01:46 -07:00
David Glasser
bd2504e04b v1.3.4 2018-03-28 13:57:11 -07:00
Renovate Bot
273d5349b4 chore(deps): update dependency @types/graphql to v0.12.7 2018-03-28 07:03:40 +00:00
David Glasser
0f7c1c53b4
Update CHANGELOG for all releases back to v1.1.3 (#915)
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.
2018-03-27 09:22:13 -07:00
Jesse Rosenberger
19d04ff7f7
v1.3.3 2018-03-26 17:20:44 +03:00
Renovate Bot
a4e2e3e893 chore(deps): update dependency @types/graphql to v0.12.6 2018-03-23 07:02:17 +00:00
renovate[bot]
5eae20e92f chore(deps): update dependency @types/graphql to v0.12.5 (#887) 2018-03-16 14:06:15 +02:00
Lukwago Allan
c9a372839d Re-export out GraphQLOptions in apollo-server-express (#871)
* 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`.
2018-03-16 12:48:40 +02:00
Jesse Rosenberger
3a0608ebc5
Tick off Prettier checkmarks, which were present on CI but not locally. (#880)
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.
2018-03-16 10:25:07 +02:00
Renovate Bot
d50b6b6fb2 chore(deps): update dependency graphql to v0.13.1 2018-03-13 16:01:14 +00:00
Sashko Stubailo
281392c3f0 Update to graphql@0.12 (#726)
* Update peer deps and tests for 0.12
* v1.3.2
2018-03-13 17:10:37 +02:00
renovate[bot]
8324a46903 chore(deps): update dependency express to v4.16.3 (#874) 2018-03-13 16:36:45 +02:00
Renovate Bot
968e3cf5a9 chore(deps): update dependency connect to v3.6.6 2018-02-15 08:01:05 +00:00
Renovate Bot
2f0ab7809c chore(deps): update dependency @types/express to v4.11.1 2018-02-02 07:01:00 +00:00
Laurin Quast
df51fd90da Setup prettier (#724)
* Setup prettier and precommit hooks

* Format code with prettier

* Use husky because it works...

* Move prettier config to .prettierrc file

* Implement fixing markdown file formatting when running lint-fix script

* Format markdown files

* Add .json file formatting

* Fixes json file formatting

* Add pretteir linting step

* Remove tslint

* Use gitignore for prettier

* Fix linting errors

* Ignore submodule folder
2018-01-08 15:08:01 -08:00
Renovate Bot
2c9965336a chore(deps): update dependency @types/express to v4.11.0 2017-12-21 10:21:31 +00:00
Martijn Walraven
6685ecb458 v1.3.1 2017-12-18 07:34:48 +01:00
Renovate Bot
81a2899810 chore(deps): update dependency @types/body-parser to v1.16.8 2017-12-12 21:55:26 +00:00
Renovate Bot
0c439cb35f chore(deps): update dependency @types/graphql to v0.11.7 2017-12-12 20:31:42 +00:00