-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apollo Server 2.0 without Docs #1063
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…efines formatError
runQuery currently takes a `query` argument that is either a string or a DocumentNode. This means that it's possible to accidentally support syntax we don't mean to. For example, if you happen to send a JSON-serialized DocumentNode over the wire, we'll happily execute that, and you'll believe you're using GraphQL even though you really aren't --- until you try to use some other GraphQL tool that expects to see the GraphQL query language rather than graphql-js ASTs. Additionally, GET requests parse their queries in runHttpQuery rather than runQuery, leading to inconsistent error handling semantics on parse failures. Simplify the runQuery API (which is technically exported though intended to be mostly internal) to take in either a parsedQuery or a queryString argument. The main use case for knowing about these parameters is if you're using formatParams with OperationStore; its docs and tests have been updated to reflect this. Stop parsing queries in runHttpQuery; instead, ensure we throw the right error for mutations-over-GET by passing the error to throw into runQuery. Stop accidentally supporting graphql-js ASTs on the wire --- but throw an informative error when you do so. This backwards-incompatible change is intended for apollo-server-core 2.0.
…ry-parse Always only parse query in runQuery and don't accept AST over the wire
…erver (#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
* 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
AS2: Fix handling errors from context constructor and merged schemas
- Actually call validationDidStart and parsingDidStart. - Use new graphql-extensions API which: - replaces fooDidEnd with a handler returned by fooDidStart - adds options to various methods - has a new willSendResponse method - requires you to construct the extension objects yourself (but make the external API for specifying extensions to ApolloServer be factories, because extensions are per request) - Make a better effort at consistently calling end handlers even on error
Allow user-defined GraphQLExtensions, add apollo-engine-reporting
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR intends to land the revival of the apollo-server package as a new entry point for building GraphQL servers. apollo-server seeks to take an opinionated approach to building GraphQL services. The apollo-server-{framework} packages provide the ability to customize the behavior of the apollo-server for different environments or frameworks.
Apollo server also provides the tooling from graphql-tools and graphql-subscriptions, includes custom schema and service runtime additions (initially production validation rules for turning off introspection and more guidance around error handling).
This is the kickoff of a new generation of work on building production ready GraphQL services♥️
The approach supersedes #979
Changes beta.2 -> beta.3
remove registerServer configuration from
apollo-server
's listen (#1090)move healthcheck into variants (#1086)
Add file uploads, breaking requires removing
scalar Upload
from the typeDefs (#1071)Changes beta.1 -> beta.2
ListenOptions:
engine
->engineProxy
port
,host
, and other http options moved underhttp
key #1080subscriptions
moved toserver.listen
#1059Add mocks to server constructor #1017
Add
bodyParserConfig
parameter toregisterServer
in apollo-server #1059 commitHapi variant #1058 #1082