graphql-platform
graphql-platform copied to clipboard
Strawberry Shake reports an issue in the wrong source file
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.
Just ran into this issue with StrawberryShake.Blazor 13.9.6 and changing the type from String to String! worked around the issue and allowed my project to compile