ChilliCream / ChilliCream/graphql-platform

Strawberry shake generating duplicate members when multiple File Inputs exist on the same type

Open
#9,559 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Product

Strawberry Shake

Version

15.1.14

Link to minimal reproduction

https://github.com/BickelLukas/Hot-chocolate-File-repro

Steps to reproduce

Checkout the repro and try to build. The build fails with
Type 'CreateTaskMutation' already defines a member called 'MapFilesFromTypeFileUpload' with the same parameter types and A local variable or function named 'u' is already defined in this scope in the generated code

What is expected?

The method should only be generated once and the build should work

What is actually happening?

Errors in the generated code

Relevant log output

Additional context

No response

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

Clone the linked minimal reproduction and run its build to confirm the duplicate MapFilesFromTypeFileUpload method and local variable errors in the generated code. Trace the Strawberry Shake generation path responsible for file inputs; done means multiple file inputs on one type generate each helper once and the reproduction builds successfully.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.