ChilliCream / ChilliCream/graphql-platform

Union types using redis subscription do not send.

Open
#8,302 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Product

Hot Chocolate

Version

15.1.5

Link to minimal reproduction

https://github.com/danCarTrim/HC-Union-Redis-Issue

Steps to reproduce

When running the sample code above subscription messages will be received in NitroUI.
When redis subscription is used (please un comment line 14 in program.cs) no messages are received.

What is expected?

For InMemorySubscriptions or RedisSubscriptions messages with union types should be sent.

What is actually happening?

When using redis subscriptions union types are not being sent.
(Union type is a field in a parent type)

Relevant log output
Microsoft.AspNetCore.Server.Kestrel.Connections: Debug: Connection id "0HNCOPU3VU98T" accepted.
Microsoft.AspNetCore.Server.Kestrel.Connections: Debug: Connection id "0HNCOPU3VU98T" started.
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request starting HTTP/1.1 GET http://localhost:5095/graphql - - -
Microsoft.AspNetCore.Routing.Matching.DfaMatcher: Debug: 1 candidate(s) found for the request path '/graphql'
Microsoft.AspNetCore.Routing.Matching.DfaMatcher: Debug: Endpoint 'Hot Chocolate GraphQL Pipeline' with route pattern '/graphql/{**slug}' is valid for the request path '/graphql'
Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware: Debug: Request matched endpoint 'Hot Chocolate GraphQL Pipeline'
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executing endpoint 'Hot Chocolate GraphQL Pipeline'
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executed endpoint 'Hot Chocolate GraphQL Pipeline'
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished HTTP/1.1 GET http://localhost:5095/graphql - 101 - - 27.1310ms
Microsoft.AspNetCore.Server.Kestrel.Connections: Debug: Connection id "0HNCOPU3VU98U" accepted.
Microsoft.AspNetCore.Server.Kestrel.Connections: Debug: Connection id "0HNCOPU3VU98T" disconnecting.
Microsoft.AspNetCore.Server.Kestrel.Connections: Debug: Connection id "0HNCOPU3VU98U" started.
Microsoft.AspNetCore.Server.Kestrel.Connections: Debug: Connection id "0HNCOPU3VU98T" stopped.
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request starting HTTP/1.1 GET http://localhost:5095/graphql - - -
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets: Debug: Connection id "0HNCOPU3VU98T" sending FIN because: "The Socket transport's send loop completed gracefully."
Microsoft.AspNetCore.Routing.Matching.DfaMatcher: Debug: 1 candidate(s) found for the request path '/graphql'
Microsoft.AspNetCore.Routing.Matching.DfaMatcher: Debug: Endpoint 'Hot Chocolate GraphQL Pipeline' with route pattern '/graphql/{**slug}' is valid for the request path '/graphql'
Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware: Debug: Request matched endpoint 'Hot Chocolate GraphQL Pipeline'
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executing endpoint 'Hot Chocolate GraphQL Pipeline'
Additional context

I am using Azure cache for redis.
When running using inMemory vs redis logs look identical at debug level.
No errors are shown anywhere.

Using redis subscriptions:
Image

Using inMemorySubscriptions:
Image

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 the linked minimal reproduction and Program.cs line 14, comparing InMemorySubscriptions with RedisSubscriptions. Trace the subscription path for a union field on a parent type and verify whether messages reach NitroUI through Azure Cache for Redis. Done means the reproduction delivers the same union subscription messages with Redis enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, graphql, redis
Domain
api, backend-api-design
Issue type
Bug
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.