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

feat: Update to Apollo Server 2.0 #4884

Merged
merged 3 commits into from
Jan 2, 2019
Merged

feat: Update to Apollo Server 2.0 #4884

merged 3 commits into from
Jan 2, 2019

Conversation

aldeed
Copy link
Contributor

@aldeed aldeed commented Dec 18, 2018

Impact: minor
Type: feature

Changes

  • Updated to Apollo Server 2.0, which has a different way of creating and initializing the server, but the end result isn't any different to clients using the /graphql-alpha endpoint
  • Apollo 2.0 now ships with GraphQL Playground instead of GraphiQL. By default it's on the same URL as the GraphQL endpoint (when in dev mode only), so I just kept the default for now. Unlike the old GraphiQL, GraphQL Playground does not automatically know who you are logged in as, so you need to set the Authorization header in the UI.
  • Apollo 2.0 now has a test client, which allows us to query it for integration tests without actually listening on a port. I've update the TestApp class and integration tests to use this, and removed the no-longer-needed find-free-port package.

Breaking changes

  • /graphiql route will no longer show the GraphiQL UI. Instead /graphql-alpha route, when you GET it through a browser, will show the GraphQL Playground UI.

Testing

  1. Verify that you see GraphQL Playground when you go to /graphql-alpha in a browser. Make sure you can query from it. You should be able to query authenticated by setting the Authorization header in the playground Headers panel. You can get your auth token by examining the headers being sent with the GraphQL POST in storefront starter kit.
  2. Do some basic smoke tests on a connected storefront, including logging in and out.

@aldeed aldeed self-assigned this Dec 18, 2018
@aldeed aldeed requested a review from rosshadden December 18, 2018 15:57
@aldeed aldeed added this to the 🏔 Shavano milestone Dec 18, 2018
@rosshadden rosshadden merged commit 0161817 into develop Jan 2, 2019
@rosshadden rosshadden deleted the feat-aldeed-apollo2 branch January 2, 2019 21:27
@spencern spencern mentioned this pull request Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants