-
-
Notifications
You must be signed in to change notification settings - Fork 802
Open
Labels
Description
Product
Strawberry Shake
Version
14.2.0
Link to minimal reproduction
Bug is produced in Client environment
Steps to reproduce
- Install
StrawberryShake.Toolversion 14.2.0 or 15.1.11 - Configure
.graphqlrc.jsonwith a GraphQL endpoint URL - Run the command:
OR
dotnet graphql update --token <token> --scheme bearer
dotnet graphql download --url <graphql-endpoint> --token <token> --scheme bearer
- The introspection query fails with the error above
What is expected?
The tool should use a modern introspection query that uses the locations field instead of the deprecated onOperation, onFragment, and onField fields, conforming to the June 2018 GraphQL specification.
What is actually happening?
The tool sends an introspection query that includes deprecated fields, which are rejected by GraphQL servers that conform to the current GraphQL specification.
Relevant log output
Download schema started.
error INTROSPECTION_ERROR: Cannot query field "onOperation" on type "__Directive".
Cannot query field "onFragment" on type "__Directive".
Cannot query field "onField" on type "__Directive".Additional context
According to the GraphQL June 2018 Specification, the __Directive type should use:
locations: [__DirectiveLocation!]!(current)- Instead of:
onOperation: Boolean!,onFragment: Boolean!,onField: Boolean!(deprecated)
The introspection query generated by StrawberryShake.Tool should be updated to use the locations field to be compatible with modern GraphQL servers.
- StrawberryShake.Tool Version: 14.2.0, 15.1.11 (both tested)
- StrawberryShake.Server NuGet Package: 14.2.0, 15.1.11 (both tested)
- .NET Version: .NET 8.0
- Operating System: Windows 10
- GraphQL Server: Hot Chocolate: 14.2.0
.config/dotnet-tools.json
{
"version": 1,
"isRoot": true,
"tools": {
"strawberryshake.tools": {
"version": "15.1.11",
"commands": [
"dotnet-graphql"
]
}
}
}