ChilliCream / ChilliCream/graphql-platform

StrawberryShake v12 that says it supports the graphql-ws protocol defaults its subprotocol to the wrong spec

Open
#5,196 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🌶️ strawberry shake Area: Subscriptions
Dominant language
C#
Stars
5.8k
Forks
810
Avg merge
15h 39m
Merged PRs (30d)
98

Description

Is your feature request related to a problem?

Hello! I saw that the StrawberryShake GQL Client had documentation to support the graphql-ws protocol as located here: https://chillicream.com/docs/strawberryshake/networking#protocols

But in the code I see that the default protocol that gets added is "graphql-ws" and not "graphql-transport-ws" (which the official documentation here states should be the correct subprotocol, I know, its weird that the project is called graphql-ws but the sub protocol they expect is graphql-transport-ws) which is what my graphql server im trying to connect to is using (not currently using hotchocolate) and the traffic manager that makes sure the protocols match up give me an error, since i cannot specify only "graphql-transport-ws" as the sole protocol.

Here is the file in question that has that default set: https://github.com/ChilliCream/hotchocolate/blob/d412413d5f93f74e897c1253e4786f61fc59f773/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketProtocolFactory.cs

The solution you'd like

I would love the ability to be able to set my own default protocol or have the option to configure my StrawberryShake client to use graphql-transport-ws protocol for subscriptions. I assume the change would be in this file: https://github.com/ChilliCream/hotchocolate/blob/d412413d5f93f74e897c1253e4786f61fc59f773/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketProtocolFactory.cs

(I tried to make an edit myself to submit as a suggestion but it didnt work locally how i thought it would, so wondering if someone in the community can help me or maybe look into this to see if im correct or not)

Product

Strawberry Shake

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketProtocolFactory.cs, where the issue says the default subprotocol is set. Compare that value with the graphql-ws PROTOCOL.md reference and the StrawberryShake networking documentation. Done means StrawberryShake can use graphql-transport-ws as the configured or default protocol for subscriptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.