Commit graph

117 commits

Author SHA1 Message Date
David Glasser
2ca26ab29b v2.0.0-rc.4 2018-06-25 13:58:12 -07:00
Martijn Walraven
acedc2690b v2.0.0-rc.3 2018-06-24 12:30:42 +02:00
Evans Hauser
846579db33
update README's and remove docs for registerServer (fixes #1216) 2018-06-22 17:51:56 -07:00
Matías Olivera
76da232c1c Add graphql peer dependency to server integrations (#1232) 2018-06-22 15:55:08 -07:00
Evans Hauser
4770f381d3
v2.0.0-rc.2 2018-06-21 19:53:33 -07:00
Evans Hauser
3bc09decb4
v2.0.0-rc.1 2018-06-21 15:33:07 -07:00
Evans Hauser
65d7b100e4
CDN cache-control headers (#1138)
* core: return response object from runHttpQuery

* core: change gqlResponse to graphqlResponse and add custom RequestInit type

* core: add cache-control headers based on the calcualted maxAge

* core: add extensions check during cache-control header creation

* core: create headers when cacheControl is not enabled otherwise pass through extensions

* express: initial tests of CDN cach-contol headers

* core: fixed tests with applyMiddleware and pass cacheControl config

* core: cache hint fixes, ignore when no maxAge, and check for rootKeys

* core: check for hints of length 0

* core: node 10 fails file upload test for some stream reason

* docs: add cdn caching section to features

* add space after // in comments

* fix feedback: proxy alignment and response creation

Adds cache-control toggles for http header calculation and stripping out
the cache control extensions from the respose.

Brings the default calculation of headers in line with the proxy.

* fix links in comments

* fix tests with null dereference

* update cdn docs and migration guide to include latest cdn configuration

* add not for engine migration to set engine to false

* add engine set to false in migration guide

* express: fixed tests

* address feedback to use omit and documentation

* docs: cdn caching is alternative to full response caching

* add back epipe check in upload tests
2018-06-21 13:29:14 -07:00
Martijn Walraven
35ac867830 Avoid direct imports of node-fetch 2018-06-21 21:35:37 +02:00
Evans Hauser
d1878703d3
Move Uploads to constructor and remove enhanceSchema (#1204)
* move uploads into server constructor

* remove enhanceSchema

* address feedback
2018-06-21 12:16:52 -07:00
Evans Hauser
7c622aa2f5
hapi: tests, add types, and fix #1195 (#1211) 2018-06-20 16:34:42 -07:00
Clarence Ngoh
70a0fad754 export UserInputError from express and hapi integrations (#1206) (#1208) 2018-06-20 16:24:32 -07:00
Evans Hauser
9af856c2c8
Typescript Improvements and esModuleInterop fix (#1210)
* add string input to gql tag

* remove esModuleInterop, tested locally

* change IMPORT_FUNCTION to something real

* fix the rest of the tests
2018-06-20 16:21:50 -07:00
Evans Hauser
9588468875
v2.0.0-rc.0 2018-06-14 23:18:07 -07:00
David Glasser
d006d4d83d v2.0.0-beta.11 2018-06-14 12:00:21 -07:00
David Glasser
3fccd43bae simplify upload enhanceSchema, rename to installSubscriptionHandlers
also export graphql-tools and graphql-subscriptions from apollo-server-core
2018-06-14 11:57:30 -07:00
David Glasser
1707967518 Specify full path in tsconfig imports
Emacs tide mode seems to require
this (https://github.com/ananthakumaran/tide/pull/238 is supposed to have fixed
it but it didn't work?)
2018-06-14 11:57:30 -07:00
Evans Hauser
327999174c move registerServer into class as applyMiddleware function 2018-06-14 11:57:30 -07:00
Evans Hauser
9d853f4be4 move ApolloServer tests into integration tests from core 2018-06-14 11:57:30 -07:00
Evans Hauser
54ced71cff initial implementation of createSubscriptionServer 2018-06-14 11:57:30 -07:00
David Glasser
ddc589d996 v2.0.0-beta.10 2018-06-13 16:07:41 -07:00
David Glasser
e32fad66a2 Allow configuration of graphql-playground 2018-06-13 15:59:41 -07:00
David Glasser
eb0ae81cfa Update integration test suite to test ApolloServer
Fix some connect bugs.
2018-06-13 15:27:44 -07:00
Evans Hauser
e66f6db413
fix: support Node 6 (#1171) 2018-06-13 14:56:09 -07:00
David Glasser
2ff159d50c Don't export middleware from packages
We are going to tweak registerServer until there is no reason to prefer a
non-ApolloServer-associated middleware function over using it.
2018-06-13 14:10:34 -07:00
David Glasser
e4a6e873f8 Remove graphiql support
ApolloServer builds in graphql-playground rather than graphiql, so we no longer
provide middleware for serving GraphiQL.

If this turns out to be an unpopular choice, we can always add support for
graphiql instead of graphql-playground back in later.

We prefer graphql-playground because it allows you to enter HTTP request
headers, view query history, and explicitly supports graphql@0.13.
2018-06-13 14:00:51 -07:00
David Glasser
40f9a4982f Remove packages for frameworks that don't yet support 2.0
Previously, we were planning to offer two kinds of APIs in "Apollo Server 2":
middleware functions just like in 1.0, and the new ApolloServer class.  We have
not yet implemented ApolloServer for all of our supported web frameworks, so
this meant that the 2.0 version of modules such as apollo-server-koa (which does
not yet have an ApolloServer class) offered very little benefits over
apollo-server-koa@1.0 (as most of the benefits of 2.0 come from ApolloServer).

This is confusing. We are going to improve the current registerServer API so
that there's no real benefit to using a separately-exported middleware directly
rather than creating an ApolloServer and applying it to your web framework. So
the AS 2.0 API will just be ApolloServer.  This means it doesn't make sense for
us to publish 2.x versions of the packages that don't yet support this API.

So this commit removes support for the following web frameworks: Adonis, Azure
Functions, Koa, Lambda, Micro, and Restify. (We leave in place Express, Hapi,
and Cloudflare workers.)

This isn't because we don't like these frameworks and don't want them to work
with Apollo Server 2.0!  We would love to see each package resurrected and an
ApolloServer implementation built, either during this current 2.x beta phase or
after the official 2.0 release. Deleting these packages for now makes it more
clear which frameworks support 2.0 and which don't, rather than existing in a
state where apollo-server-express@2 has ApolloServer and apollo-server-koa@2
does not.
2018-06-13 13:45:10 -07:00
David Glasser
1fd3b216d0 Remove engineProxy support
We recommend the use of apollo-engine-reporting and the other built-in features
of AS 2.0 rather than engineProxy. You can still use the apollo-engine npm
module manually with AS 2.0, or stay on AS 1.0.
2018-06-13 12:32:05 -07:00
David Glasser
519b6fd056 v2.0.0-beta.9 2018-06-13 11:47:30 -07:00
Evans Hauser
0178840837
express, hapi: export ApolloServer 2018-06-13 11:21:16 -07:00
Evans Hauser
afcd1709f3
core, integrations: break apart coupling of introspection and gui enable 2018-06-12 23:11:06 -07:00
Evans Hauser
db8eba871f
v2.0.0-beta.8 2018-06-12 17:54:55 -07:00
Evans Hauser
ba31cf7a44
Integrations export their own ApolloServer (#1161)
* feat: ApolloServer is created and exported by all variants

* docs: add initial docs around exporting ApolloServer

* feat: export gql from integrations

* docs: change apollo-server examples to use express with registerServer

* server: remove registerExpressServer

* core, docs: comment functions, fix api reference, context creation more like middleware args

* docs: fix integrationed typo
2018-06-12 17:46:56 -07:00
David Glasser
df8e487368 v2.0.0-beta.7 2018-06-11 18:45:23 -07:00
David Glasser
3e93524ac3 v2.0.0-beta.6 2018-06-11 15:54:01 -07:00
Martijn Walraven
e4164c8892 Enable esModuleInterop and fix imports
See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html
2018-06-11 14:25:59 +02:00
Martijn Walraven
4a068cff74 Add engines field with node >= 8 in package.json 2018-06-11 13:21:51 +02:00
Evans Hauser
4c6352aad7
v2.0.0-beta.5 2018-06-07 14:50:13 -07:00
Evans Hauser
8601919ad9
server,express,hapi: bump graphql-playground and express type versions 2018-06-06 12:03:21 -07:00
Evans Hauser
5079246bc4
apollo-server,core,hapi,express: bump package to newest beta.4 2018-06-04 10:16:54 -07:00
David Glasser
836616bd04 Turn on noUnusedLocals and noUnusedParameters (#1126) 2018-06-01 15:16:16 -07:00
Evans Hauser
4405405321 hapi,express: fix graphql playground subscriptitionPath argument for typing 2018-06-01 12:34:49 -07:00
Evans Hauser
ec7394d1b3 apollo-server,core,hapi,express: bump package to newest beta 2018-06-01 12:34:49 -07:00
David Glasser
66189657b3 Rename ApolloServer.request to graphQLServerOptionsForRequest 2018-05-31 00:14:59 -07:00
Evans Hauser
5bb652a32d
hapi: add new server instantiation to the readme 2018-05-30 15:23:57 -07:00
Evans Hauser
da316908d2
runQuery accepts Request object that variants create (#1108)
* core: runQuery accepts Request object that integrations create

* core: add changelog for Requst in runQuery

* adonis: correct request object passed to runQuery

* core: change convertHttpMessageToRequest to convertNodeHttpToRequest
2018-05-29 21:37:38 -07:00
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
1f784636d9
apollo-server: move health check into variant's registerServer call 2018-05-22 21:58:37 -07:00
Evans Hauser
69be8c8429
apollo-server-hapi: add cors option to registerServer (#1085) 2018-05-22 21:25:52 -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