Skip to content
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 #1125

Merged
merged 649 commits into from
Jul 14, 2018
Merged

Apollo Server 2.0 #1125

merged 649 commits into from
Jul 14, 2018

Conversation

evans
Copy link
Contributor

@evans evans commented Jun 1, 2018

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-{integration} 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 and is used in favor of #1063, since it deploys the docs directly to the v2 page

Note: If you are trying to develop on top of this branch, you may have to run npm install twice.

rc.5 -> rc.6

rc.4 -> rc.5

rc.3 -> rc.4

  • Add trailing slash to data source
  • allow body passed to data source
  • new apollo-engine-reporting agent

rc.2 -> rc.3

rc.1 -> rc.2

rc.0 -> rc.1

Data sources

Changes beta -> rc.1

Changes beta.3 -> beta.4

Bug fix to allow async context (#1129)
logFunction is now an extension (#1128)
Allow user defined extensions and include engine reporting (#1105 )

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)
Add reporting to Engine as apollo-engine-reporting (#1105)
Allow users to define extensions (#1105)

Changes beta.1 -> beta.2

ListenOptions:
engine -> engineProxy
port, host, and other http options moved under http key #1080

subscriptions moved to server.listen #1059
Add mocks to server constructor #1017
Add bodyParserConfig parameter to registerServer in apollo-server #1059 commit
Hapi variant #1058 #1082

@ghost ghost added 📝 documentation Focuses on changes to the documentation (docs) ⛲️ feature New addition or enhancement to existing solutions labels Jun 1, 2018
});

// Additional middleware can be mounted at this point to run before Apollo.
app.use('*', jwtCheck, requireAuth, checkScope);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see that you have this documented here. Thanks @evans

@unicodeveloper
Copy link
Contributor

This is a really huge PR. @evans do you have an ETA for getting this merged or will you break it into smaller PRs?

evans and others added 19 commits June 7, 2018 14:50
* 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
@@ -35,6 +35,7 @@
"dependencies": {
"apollo-server-core": "^2.0.0-beta.6",
"apollo-server-express": "^2.0.0-beta.6",
"express": "^4.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really an issue and probably not worth fixing now, but unless we keep the versions between apollo-server and apollo-server-express in sync this does lead to a Lerna warning:

lerna WARN EHOIST_PKG_VERSION "apollo-server-express" package depends on express@4.16.3, which differs from the hoisted express@^4.0.0.

zionts and others added 7 commits July 11, 2018 15:42
* Add a wider diversity of `gui` options

Although I know we want to remain less tied to the GraphQL Playground
GUI options, we definitely want to support a wider variety of options to
be passed in. This adds support for specifying partial options either
statically or dynamically for the gui, which can be extended to allow
for a wider array of guis than only GraphQL playground.

* Add boolean option and configuration for tabs

* move gui setting into ApolloServer Constructor

* document playground configuration in the constructor

* update playground types and fixed micro + koa integrations

* change gui to playground

* docs: change gui to playground

* fix logic for playground creation
* remove formatParams

* remove formatParams from documentation

* check for valid query string after persisted query mapping

* fix sentence about different logging and label extensions as experimental

* mark graphql-extensions as more experimental
applyMiddleware is not a public api for apollo-server, so it should not
be used an direct people to the apollo-server-express integration.
@evans evans merged commit ae9da10 into master Jul 14, 2018
abernix added a commit that referenced this pull request Feb 5, 2019
Fixes issue introduced in #1125 and logged in #2186 and #2196.

Arrays are valid JSON per spec: https://tools.ietf.org/html/rfc7159
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
⛲️ feature New addition or enhancement to existing solutions 📝 documentation Focuses on changes to the documentation (docs)
Projects
None yet
Development

Successfully merging this pull request may close these issues.