ChilliCream / ChilliCream/graphql-platform
StrawberryShake v13 not generating source for schema with inheritance
Nobody has claimed this yet.
- 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
Describe the bug
I have an existing HC/SS v12 based solution with an inheritance structure in it. SSv12 had no problem generating code from this model, but SSv13 complains twice about the base class, saying that it's been defined already. I'm attaching a minimized and anonymized schema file that illustrates the problem. In this schema, "Exercise" and "Survey" both inherit the common base class "Activity".
Running "dotnet graphql generate" yields the output provided below.
Steps to reproduce
- Run the SSv13 graphql "generate" function against the provided schema.
Relevant log output
PM> dotnet graphql generate
Generate C# Clients started.
Generate Include started.
Generate Include completed in 366 ms
error HC0065: The name `Activity` was already registered by another type.
Generate IncludeClient started.
Generate IncludeClient completed in 110 ms
error HC0065: The name `Activity` was already registered by another type.
Additional Context?
https://gist.github.com/MelGrubb/e8ec4ca7509269505de4216cd34eb091
Product
Strawberry Shake
Version
13.0.0-preview.88
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimized schema linked in the issue and run dotnet graphql generate against it to reproduce the duplicate Activity HC0065 errors. Trace the Strawberry Shake v13 generation path for inherited types; done means the schema generates successfully without reporting Activity as already registered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100