import { PluginFunction, PluginValidateFn } from '@graphql-codegen/plugin-helpers'; /** * @description This plugin generates an introspection file but only with Interfaces and Unions, based on your GraphQLSchema. * * If you are using `apollo-client` and your schema contains `interface` or `union` declaration, it's recommended to use Apollo's Fragment Matcher and the result generated by the plugin. * * You can read more about it in `apollo-client` documentation: https://www.apollographql.com/docs/react/data/fragments/#fragments-on-unions-and-interfaces. * * Fragment Matcher plugin accepts a TypeScript / JavaScript or a JSON file as an output _(`.ts, .tsx, .js, .jsx, .json`)_. * * Both in TypeScript and JavaScript a default export is being used. * * > The output is based on the output you choose for the output file name. */ export interface FragmentMatcherConfig { /** * @description Compatible only with JSON extension, allow you to choose the export type, either `module.exports` or `export default`. Allowed values are: `commonjs`, `es2015`. * @default es2015 * * @exampleMarkdown * ```yml * generates: * path/to/file.json: * plugins: * - fragment-matcher * config: * module: commonjs * ``` */ module?: 'commonjs' | 'es2015'; /** * @description Compatible only with TS/TSX/JS/JSX extensions, allow you to generate output based on your Apollo-Client version. Valid values are: `2`, `3`. * @default 3 * * @exampleMarkdown * ```yml * generates: * path/to/file.ts: * plugins: * - fragment-matcher * config: * apolloClientVersion: 3 * ``` */ apolloClientVersion?: 2 | 3; /** * @description Create an explicit type based on your schema. This can help IDEs autofill your fragment matcher. This is mostly useful if you do more with your fragment matcher than just pass it to an Apollo-Client. * @default false * * @exampleMarkdown * ```yml * generates: * path/to/file.ts: * plugins: * - fragment-matcher * config: * useExplicitTyping: true * ``` */ useExplicitTyping?: boolean; federation?: boolean; } export declare const plugin: PluginFunction; export declare const validate: PluginValidateFn;