Skip to content

Commit

Permalink
add OperationName to IntrospectionQuery Query (#11)
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Deutsch <[email protected]>
  • Loading branch information
jasondeutsch and Jason Deutsch authored Aug 31, 2020
1 parent 2770323 commit 50dede0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion introspection.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/vektah/gqlparser/v2/ast"
)


// IntrospectRemoteSchema is used to build a RemoteSchema by firing the introspection query
// at a remote service and reconstructing the schema object from the response
func IntrospectRemoteSchema(url string) (*RemoteSchema, error) {
Expand Down Expand Up @@ -50,8 +51,13 @@ func IntrospectAPI(queryer Queryer) (*ast.Schema, error) {
// a place to hold the result of firing the introspection query
result := IntrospectionQueryResult{}

input := &QueryInput{
Query: IntrospectionQuery,
OperationName: "IntrospectionQuery",
}

// fire the introspection query
err := queryer.Query(context.Background(), &QueryInput{Query: IntrospectionQuery}, &result)
err := queryer.Query(context.Background(), input, &result)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 50dede0

Please sign in to comment.