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

Update GraphiQL, add GraphiQL subscription support #1001

Merged

Conversation

eabruzzese
Copy link
Collaborator

@eabruzzese eabruzzese commented Jul 12, 2020

I recently spent some time implementing subscriptions at work, and ended up going down the rabbit hole of upgrading GraphiQL and adding subscription support to it.

This PR will:

  • Update the GraphiQL template to use the latest versions of react, react-dom, graphiql, and (new) subscriptions-transport-ws.
  • Add support for websocket connections and subscriptions to the GraphiQL template.
  • Tweak the wrapping function in graphiql.js to inject global dependencies so that they're considered function-local by linters.
  • Add a SUBSCRIPTION_PATH configuration option to allow GraphiQL to route subscriptions to a different path (allowing for more advanced infrastructure scenarios).
  • Update the documentation to include some starting points for implementing subscriptions and configuring SUBSCRIPTION_PATH.

* Update the GraphiQL template to use the latest versions of react,
  react-dom, graphiql, and (new) subscriptions-transport-ws.
* Add support for websocket connections and subscriptions to the
  GraphiQL template.
* Add a `SUBSCRIPTION_URL` configuration option to allow GraphiQL to
  route subscriptions to a different path (allowing for more advanced
  infrastructure scenarios).
* Update the README to include some starting points for implementing
  subscriptions and configuring `SUBSCRIPTION_URL`.
Copy link
Member

@jkimbo jkimbo left a comment

Choose a reason for hiding this comment

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

This is fantastic thanks @eabruzzese !

@jkimbo jkimbo merged commit 6aa6aaa into graphql-python:master Jul 12, 2020
@eabruzzese eabruzzese deleted the add-graphiql-subscription-support branch July 12, 2020 15:43
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.

None yet

2 participants