Closed jmarbutt closed 3 years ago
@jmarbutt Have you tried using the endpoints extension as shown in this example?
I haven't tried using a yaml file for configuration, but I guess in your case it should look something like this:
schema: http://localhost:8080/v1/graphql
extensions:
endpoints:
default:
url: http://localhost:8080/v1/graphql
headers:
X-Hasura-Admin-Secret: 123456
thanks @emmiep that is the recommended graphql-config
usage!
@jmarbutt the schema headers are used for retrieving the remote schema, not necessarily the operations, thats what extensions.endpoints
is for.
Actual Behavior
When defining schema in
.graphqlrc.yml
but no end points does not use the headers when executing queries from a query in vs code.Expected Behavior
It should use the end point with the default schema headers
Steps to Reproduce the Problem Or Description
This is using a docker hosted version of Hasura but any graph ql api should work.
Create a
.graphql
file with the a query, for example:Execute Query
in Visual studioSpecifications
Logs Of TS Server || GraphQL Language Service
The warning in the logs is: