-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Some newer apps complain about missing locations when placing an IntrospectionQuery request.
A quick fix is to add the following to the directive's definition object in the schema.go file:
"locations": []string{"FIELD", "FRAGMENT_DEFINITION", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"},Below is an example where it would be placed...
schema.go (lines 269-315)
result := map[string]interface{}{
"queryType": executor.introspectType(params, queryRoot),
"directives": []map[string]interface{}{
{
"name": "skip",
"description": "Conditionally exclude a field or fragment during execution",
"args": []map[string]interface{}{ ... },
"locations": []string{"FIELD", "FRAGMENT_DEFINITION", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"},
"onOperation": false,
"onField": true,
"onFragment": true,
},
...
},
}schema.go (lines 88-96)
const INTROSPECTION_SCHEMA = `
...
type __Directive {
name: String!
description: String
args: [__InputValue!]!
locations: [String!]!
onOperation: Boolean!
onFragment: Boolean!
onField: Boolean!
}
...
`Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels