question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Implement graphql-ws protocol support

See original GitHub issue

Currently Ariadne implements subscription-transport-ws protocol which Apollo has deprecated and replaced with graphql-ws.

We should either update ariadne.asgi.GraphQL to graphql-ws or refactor it to make WebSocket support handled via strategy pattern, eg:

app = GraphQL(schema, websocket=GraphQLWS(options))

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
piglettocommented, Apr 22, 2022

@rafalp @eugeneyalansky In fact I’ve already started working on adding graphql-transport-ws protocol (this is the correct protocol name, while project is graphql-ws) to Ariadne. See my fork: https://github.com/pigletto/ariadne/tree/graphql-transport-ws-protocol

Some details about this implementation: The protocol detection is done automatically. Running queries and mutations is also done (for both protocols). I consider this implementation almost done - currently I’m writing tests and doing some minor fixes. Some ideas are borrowed from Strawberry project

0reactions
rafalpcommented, Oct 7, 2022

Relased in 0.16

Read more comments on GitHub >

github_iconTop Results From Across the Web

graphql-ws/PROTOCOL.md at master - GitHub
Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client. - graphql-ws/PROTOCOL.md at master ...
Read more >
GraphQL over WebSockets – The Guild
Coherent, zero-dependency, lazy, simple, server and client implementation of the new, security first, GraphQL over WebSocket Protocol.
Read more >
WebSocket Link - Apollo GraphQL Docs
A W3C-compliant WebSocket implementation to use. Provide this if your environment does not provide native WebSocket support (for example, in Node.js). Usage.
Read more >
GraphQL with WebSocket Protocol and Subscriber - XenonStack
Introduction GraphQL with WebSocket. GraphQL is a great way to write customizable API's and combine numerous services into one endpoint.
Read more >
graphql-ws - npm
Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client. Continuous integration graphql-ws. Use ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found