Commit graph

746 commits

Author SHA1 Message Date
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
83c866e8d4
core: add graphql-tag as export 2018-06-12 23:13:04 -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
dbfa57c95d dep on express (there is an import), other tweaks 2018-06-11 18:44:55 -07:00
David Glasser
3e93524ac3 v2.0.0-beta.6 2018-06-11 15:54:01 -07:00
Evans Hauser
a7cd3a43e8 Apollo Server 2:Automatic Persisted Queries (#1149) 2018-06-11 15:44:20 -07:00
David Glasser
ff90e5cf2f upgrade apollo-engine-reporting (better error handling) 2018-06-11 15:19:30 -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
2f44a42bb8 Remove Object.setPrototypeOf workaround for error subclasses on ES5 2018-06-11 14:00:47 +02:00
Martijn Walraven
c5892f6fcd Disable failing file upload test 2018-06-11 13:59:04 +02:00
Martijn Walraven
4a068cff74 Add engines field with node >= 8 in package.json 2018-06-11 13:21:51 +02:00
Martijn Walraven
0aff6c8c40 Update compilation target to ES2017 and fix issus 2018-06-11 13:06:31 +02:00
Martijn Walraven
1e1b49ec29 Update devDependencies, including typescript 2018-06-11 12:13:03 +02:00
Martijn Walraven
b5eab35807 Remove duplicate common dependencies to avoid Lerna warnings 2018-06-11 11:57:00 +02:00
David Glasser
32968bf5ec Update to apollo-tracing which works with new handler ordering 2018-06-08 12:18:51 -07:00
Clarence Ngoh
5f307928a2 Add BadUserInputError as extension of ApolloError (#1143)
* Add BadUserInputError and TransientError as extensions of ApolloError

* remove TransientError

* update test so that properties end up under `error.extensions.exception`

* update documentation to talk about BadUserInputError

* check for properties after formatApolloErrors has been called

* fixed highlighted lines for docs

* export BadUserInputError from `apollo-server`

* fixed highlighted lines for docs

* export BadUserInputError from `apollo-server`

* update changelog
2018-06-08 10:39:23 -07:00
Evans Hauser
4c6352aad7
v2.0.0-beta.5 2018-06-07 14:50:13 -07:00
Evans Hauser
a04bea3fe2
cloudflare: set as private while permissions are worked out 2018-06-07 14:38:32 -07:00
Evans Hauser
f9cd6ce7c1
docs: fix comments about gql-tag 2018-06-07 14:21:40 -07:00
David Glasser
b2fb680812 update engine reporting dependencies 2018-06-06 18:32:08 -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
9e87f405ed
core: add changelog for gql-tag change 2018-06-06 11:36:49 -07:00
Evans Hauser
adfe69cb6a
core: display only first 200 characters of schema on gql error 2018-06-06 11:36:49 -07:00
Evans Hauser
b07b9e8e8b
core,express: export gql tag directly to align with client 2018-06-06 11:02:01 -07:00
Renovate Bot
8e3e370c53 chore(deps): update dependency @types/express to v4.16.0 2018-06-05 07:30:52 +00:00
Evans Hauser
5079246bc4
apollo-server,core,hapi,express: bump package to newest beta.4 2018-06-04 10:16:54 -07:00
Evans Hauser
1e70a446b2
Enable Apollo Server 2 to have async context + test (#1129)
* core: add test for context as async function

* core,express: add support and test of context as async function
2018-06-04 09:46:55 -07:00
Renovate Bot
7d9a978683 chore(deps): update dependency @types/restify to v5.0.9 2018-06-02 11:17:30 +00:00
Renovate Bot
e57bf2a742 chore(deps): update dependency @types/koa to v2.0.46 2018-06-02 07:30:10 +00:00
David Glasser
5c65742a39
Factor out runQuery's use of logFunction into an extension (#1128)
This requires a slightly newer graphql-extensions beta which has more arguments
to requestDidStart.

Also make it ok to not pass logFunction to formatApolloErrors, and make sure
custom fieldResolvers continue to work with extensions (by upgrading the
dependency and fixing a logic bug).

The custom fieldResolvers fix means that we now unconditionally put the
extension stack on the GraphQL context, which means that the context can no
longer be (say) a string.  I changed a test that expected string contexts to
work. You couldn't use a string for a context when using extensions before, so
this isn't that big of a change.
2018-06-01 21:16:25 -07:00
David Glasser
836616bd04 Turn on noUnusedLocals and noUnusedParameters (#1126) 2018-06-01 15:16:16 -07:00
Evans Hauser
db3316cbac
Merge branch 'version-2' into refactor-2.0 2018-06-01 13:36:34 -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
5e1b49bbc5 basic apollo-engine-reporting integration 2018-06-01 12:34:49 -07:00
Renovate Bot
ef8b119ede chore(deps): update dependency @types/aws-lambda to v8.10.6 2018-06-01 07:56:13 +00:00
Renovate Bot
8d73bd027b chore(deps): update dependency typescript to v2.8.4 2018-05-31 16:23:37 +00:00
Renovate Bot
45c5874312 chore(deps): update dependency hapi to v17.5.1 2018-05-31 14:46:20 +00:00
David Glasser
66189657b3 Rename ApolloServer.request to graphQLServerOptionsForRequest 2018-05-31 00:14:59 -07:00