Is there any example to run a simple query against an existing schema using authentication?
Perhaps I misunderstood what is this library for. My goal is to run a simple query against my graphQL server programmatically using also a Bearer token for authentication.
I am trying to do
query := `
query MyQuery {
queryImage {
id
}
}
`
params := graphql.Params{RequestString: query}
r := graphql.Do(params)
if len(r.Errors) > 0 {
log.Fatalf("failed to execute graphql operation, errors: %+v", r.Errors)
}
rJSON, _ := json.Marshal(r)
fmt.Printf("%s \n", rJSON)
Is there any example to run a simple query against an existing schema using authentication?
Perhaps I misunderstood what is this library for. My goal is to run a simple query against my graphQL server programmatically using also a Bearer token for authentication.
I am trying to do
The response is always empty.