UNPKG

1.06 kBTypeScriptView Raw
1import { RawClientSideBasePluginConfig } from '@graphql-codegen/visitor-plugin-common';
2/**
3 * This plugin generate a generic SDK (without any Requester implemented), allow you to easily customize the way you fetch your data, without loosing the strongly-typed integration.
4 */
5export interface RawGenericSdkPluginConfig extends RawClientSideBasePluginConfig {
6 /**
7 * usingObservableFrom: `import Observable from 'zen-observable'`
8 * OR
9 * usingObservableFrom: `import { Observable } from 'rxjs'`
10 */
11 usingObservableFrom?: string;
12 /**
13 * @description By default the `request` method return the `data` or `errors` key from the response. If you need to access the `extensions` key you can use the `rawRequest` method.
14 * @default false
15 *
16 * @exampleMarkdown
17 * ```yaml
18 * generates:
19 * path/to/file.ts:
20 * plugins:
21 * - typescript
22 * - typescript-operations
23 * - typescript-generic-sdk
24 * config:
25 * rawRequest: true
26 * ```
27 */
28 rawRequest?: boolean;
29}