ChilliCream / ChilliCream/graphql-platform

Generated union type classes are empty with SS13.0.5 and .NET7 when using fragments

Open
#5,992 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is there an existing issue for this?
  • I have searched the existing issues
Product

Strawberry Shake

Describe the bug

When creating a client, based on a schema with union types the generated classes does not contain the requested fields when they are requested using fragments.
Same clients are working as expected with SS12.x

Steps to reproduce

StrawberryShakeUnionTypeBug

The repo contains a simple client which shows the error.

Relevant log output

No response

Additional Context?

No response

Version

13.0.5

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 running the StrawberryShakeUnionTypeBug reproduction linked in the issue with Strawberry Shake 13.0.5 and .NET 7. Inspect the generated union type classes for a schema that uses fragments, then compare the output with Strawberry Shake 12.x. Done means the generated classes contain the requested fragment fields and the reproduction no longer shows empty types.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, graphql
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.