@radzor/graphql-client
Execute GraphQL queries and mutations with automatic batching, response caching, and subscription support via WebSocket. Uses raw fetch for HTTP transport and native WebSocket for subscriptions.
Install
View source on GitHub →Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| endpoint* | string | — | The GraphQL HTTP endpoint URL. |
| headers | Record<string, string> | — | Default headers to send with every request (e.g. authorization). |
| cacheEnabled | boolean | false | Whether to enable in-memory response caching for queries. |
| cacheTtlMs | number | 60000 | Cache TTL in milliseconds. |
| batchEnabled | boolean | false | Whether to enable request batching. |
| batchIntervalMs | number | 50 | Batching window in milliseconds. Requests within this window are combined. |
| wsEndpoint |