ChilliCream / ChilliCream/graphql-platform

Persisted query output directory is not ignored when building the client

Open
#5,888 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🌶️ strawberry shake Area: Persisted Queries
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

If you have setup persisted queries and have generated a persisted query for an operation named X, changing any persisted query build parameters in the .csproj will produce the following error on a re-build:

The operation name X is not unique

Steps to reproduce
  1. Have a working Strawberry Shake setup and enable persisted queries
<GraphQLRequestHash>md5</GraphQLRequestHash>
<GraphQLOutput>intermediate</GraphQLOutput>
<GraphQLPersistedQueryOutput>test</GraphQLPersistedQueryOutput>
<GraphQLPersistedQueryFormat>default</GraphQLPersistedQueryFormat>
  1. Build the project and observe the build running to completion and a test directory with your persisted query files being generated
  2. Change any of the parameters, for example the hash format
<GraphQLRequestHash>sha256</GraphQLRequestHash>
  1. Rebuild the project and observe the described error
Relevant log output

No response

Additional Context?

Deleting all previously generated persisted query files allows to build to complete and the new settings to be applied.

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 reproducing the rebuild in the Strawberry Shake client project using the shown .csproj properties, especially GraphQLPersistedQueryOutput. Inspect how generated persisted query files are discovered or excluded during subsequent builds. Done means changing a build parameter and rebuilding succeeds without the duplicate operation-name error or manual deletion of the output directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.