ChilliCream / ChilliCream/graphql-platform

Strawberry Shake reports an issue in the wrong source file

Open
#3,338 1 comment 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

Strawberry Shake reports an issue in the wrong source file

StrawberryShake 11.1.0-preview.89

Please find attached the sample project.

Change to it directory and run:

dotnet build

Actual result

This correctly fails due to the existing type issue but the error points to the wrong source file:

...\HCSS_210323\GraphQL\Queries\GetCommentThread.graphql(3,27): error SS0002:
The variable `workspaceUrl` is not compatible with the type of the current
location. [...\HCSS_210323\My.Client.csproj]
    0 Warning(s)
    1 Error(s)

Note that it points to GetCommentThread.graphql.
But the issue is in GetProjects.graphql.

In GetProjects.graphql change

query GetProjects($workspaceUrl: String) {

to

query GetProjects($workspaceUrl: String!) {

and build again, the build succeeds.

Expected result

The build fails and reports an issue in the correct source file GetProjects.graphql.


HCSS_210323.zip

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

Extract the attached HCSS_210323.zip sample, change to its directory, and run dotnet build to reproduce the diagnostic. Compare the reported location with GetProjects.graphql and GetCommentThread.graphql; done means the existing workspaceUrl type error is reported against GetProjects.graphql.

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
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.