ChilliCream / ChilliCream/graphql-platform

Use folder name in namespace for StrawberryShake generation

Open
#5,815 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

Is your feature request related to a problem?

Having 2 clients in the same project in different folders, StrawberryShake will generate code with the same namespace. This will produce type colision if same type name is used in both clients.

As workaround we can specify the namespace into client configuration.

The solution you'd like

That StrawberryShake will add the client folder (if any) in the generated code namespace.

e.g.
Project
-FolderClient1
-FolderClient2

Resulting namespace:

  • Project.FolderClient1
  • Project.FolderClient2

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 locating Strawberry Shake's client code generation and the client namespace configuration. Reproduce the case with two clients in different folders, then verify that generated namespaces include each client folder and no longer collide when type names overlap.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, graphql
Domain
api, tooling
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.