GraphQL syntax differs significantly between implementations.
VS Code REST Client
POST https://api.example.com/graphql
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query ($id: ID!) {
user(id: $id) { name email }
}
{"id": "123"}
JetBrains
GRAPHQL https://api.example.com/graphql
query ($id: ID!) {
user(id: $id) { name email }
}
{"id": "123"}
httpyac
POST https://api.example.com/graphql
Content-Type: application/json
gql MyQuery < ./query.gql
{"variable": "value"}
VS Code REST Client
Section titled “VS Code REST Client”Uses a POST method with a special X-REQUEST-TYPE: GraphQL header. The query is the body, separated from optional variables by a blank line:
POST https://api.example.com/graphqlContent-Type: application/jsonX-REQUEST-TYPE: GraphQL
query ($id: ID!) { user(id: $id) { name email }}
{"id": "123"}JetBrains HTTP Client
Section titled “JetBrains HTTP Client”Uses a dedicated GRAPHQL method keyword:
GRAPHQL https://api.example.com/graphql
query ($id: ID!) { user(id: $id) { name email }}
{"id": "123"}JetBrains also supports GraphQL over WebSocket (ws:// / wss:// URLs). Live template shortcut: gqlr.
httpyac
Section titled “httpyac”Automatically detects GraphQL queries in POST bodies (no special header required). Supports GraphQL fragments and importing queries from .gql files:
POST https://api.example.com/graphqlContent-Type: application/json
gql MyQuery < ./query.gql
{"variable": "value"}httpyac auto-generates the proper {"query": "...", "variables": {...}} JSON envelope.
kulala.nvim
Section titled “kulala.nvim”Supports GraphQL through the GRAPHQL keyword (JetBrains-compatible).
Visual Studio 2022
Section titled “Visual Studio 2022”Does not support GraphQL.
| Feature | VS Code | JetBrains | httpyac | VS 2022 | kulala |
|---|---|---|---|---|---|
| GraphQL via X-REQUEST-TYPE header | |||||
| GraphQL via GRAPHQL keyword | |||||
| GraphQL auto-detection | |||||
| WebSocket JetBrains: WEBSOCKET keyword. httpyac: WS/WSS keyword. | |||||
| gRPC httpyac supports all four RPC types. | |||||
| Server-Sent Events JetBrains: via script processing. httpyac: SSE/EVENTSOURCE keyword. | |||||
| MQTT Unique to httpyac. | |||||
| AMQP/RabbitMQ Unique to httpyac. |