@graphql-codegen/gql-tag-operations
Version:
GraphQL Code Generator plugin for generating a typed gql tag function
19 lines (18 loc) • 674 B
TypeScript
import { PluginFunction } from '@graphql-codegen/plugin-helpers';
import { Source } from '@graphql-tools/utils';
import { FragmentDefinitionNode, OperationDefinitionNode } from 'graphql';
export declare type OperationOrFragment = {
initialName: string;
definition: OperationDefinitionNode | FragmentDefinitionNode;
};
export declare type SourceWithOperations = {
source: Source;
operations: Array<OperationOrFragment>;
};
export declare const plugin: PluginFunction<{
sourcesWithOperations: Array<SourceWithOperations>;
useTypeImports?: boolean;
augmentedModuleName?: string;
gqlTagName?: string;
emitLegacyCommonJSImports?: boolean;
}>;