This repository has been archived by the owner on Aug 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
GraphQL
Willem Liu edited this page Mar 26, 2021
·
8 revisions
A simple POST request with the GraphQL Query as body is everything you need to query a GraphQL Server. Examples here:
https://graphql.org/graphql-js/graphql-clients/
Example:
fetch('/graphql', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
},
body: JSON.stringify({query: "{ hello }"})
})
.then(r => r.json())
.then(data => console.log('data returned:', data));
data returned: Object { hello: "Hello world!" }
https://graphql-config.com/ aims to standardize configuration for all GraphQL related tooling.
It recommends having all GraphQL related configuration in a file at the root of the project named .graphqlrc
.
Furthermore it specifies the format of this configuration file.
The official VSCode GraphQL plugin makes use of this configuration standard.
For autocomplete, syntax highlighting and inline query execution.
- Official VSCode GraphQL plugin
- 3rd party IntelliJ JS GraphQL plugin