You can easily achieve this by adding a custom http header in your request headers X-Request-Type: GraphQL, or simply type graphql, a built-in snippet will be available for you. Here I use the example provided by @ferronrsmith himself
POST http://localhost:60000/graphql HTTP/1.1
content-type: application/json
x-request-type: GraphQL
Authorization: Bearer xxxx
_Originally posted by @Huachao in https://github.com/Huachao/vscode-restclient/issues/127#issuecomment-509490845_
@Huachao @ferronrsmith
can you force all headers to be lowercase as per HTTP RFC2616 Section 4.2.
https://datatracker.ietf.org/doc/html/rfc2616#section-4.2
I was really struggling with using the graphql functionality until I figured out the code snippet above is looking for case sensitive string `x-request-type: GraphQL`
thanks so much for your contribution.
query ($context: ListDataFilesInput) { listDataFiles(input: $context) { name, lastModified } }
{ "context": { "customerCode": "test", "meshKey": "test", "dataBucketCode": "test-bucket", "filter": "" } }