ChilliCream / ChilliCream/graphql-platform

Support for SSE event streams in Strawberry Shake

Open
#8,555 0 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

Product

Strawberry Shake

Is your feature request related to a problem?

How do you configure Strawberryshake to use SSE correctly? I'm having trouble with the websocket transport in my deployed app (it is working fine locally) so I'm trying SSE instead but while it works on the wire level (and in Nitro) strawberry shake does not respond to the individual messages/events - it just keeps waiting even though i can see messages coming through. The same setup works fine when switched to websocket.

Here is my .graphqlrc

{
  "schema": "schema.graphql",
  "documents": "**/*.graphql",
  "extensions": {
    "strawberryShake": {
      "name": "GraphQLClient",
      "namespace": "TK.Dialogs.Portal.Modules.Tenant.Client.GraphQL",
      "url": "<https://localhost:7201/dev/graphql>",
      "dependencyInjection": true,
      "records": {
        "inputs": true,
        "entities": true
      },
      "transportProfiles": [
        {
          "name": "Default",
          "default": "HTTP",
          "subscription": "WebSocket"
        },
        {
          "name": "SSE",
          "default": "HTTP",
          "subscription": "HTTP"
        }
      ]
    }
  }
}
Image

As you can see in the screenshot messages are coming through but the strawberryshake client does not react to them whereas when I swap the websocket protocol with the same code everything works.
Slack Message

The solution you'd like

I wish the SSE transport worked exactly like the Websocket transport with the strawberry shake client responding to individual messages

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 by reproducing the issue with the provided .graphqlrc, Strawberry Shake client, and SSE endpoint, comparing its event handling with the working WebSocket transport. The work is done when individual SSE messages trigger client responses as WebSocket messages do; no source files or tests are named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.