-
Notifications
You must be signed in to change notification settings - Fork 179
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
Enable Subscription Functionality for GraphiQL-Explorer #1125
Conversation
…ided) and use default subscription url (if subscription_url is not provided)
Tests are failing. Can you fix them? |
fixed test
Co-authored-by: Rafał Pitoń <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #1125 +/- ##
=======================================
Coverage 97.82% 97.82%
=======================================
Files 115 115
Lines 7763 7767 +4
=======================================
+ Hits 7594 7598 +4
Misses 169 169
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
OK, I have fixed the tests: Added the new expected html from graphiql-explorer to the test snapshots. |
There's also a test for passing options to graphiQL explorer. Can you add one more for custom subscription url? https://github.com/mirumee/ariadne/blob/master/tests/explorers/test_explorers.py#L19 |
OK, I have added the test: |
Thank you for contributing. This will need to have an changelog entry and documentation updated, but I'll handle those before next release. |
The way GraphiQL-Explorer is currently initialized by Ariadne, subscriptions do not work.
This pull request allows to set the subscription endpoint (to be used by GraphiQL) manually via a
subscription_url
-parameter, which defaults to a websocket connection at the location of the graphiql-explorer (e.g.,ws://localhost:8000/graphql/
, if the explorer is reached viahttp://localhost:8000/graphql/
).