1/* eslint-disable */
2import * as types from './graphql';
3import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
4
5/**
6 * Map of all GraphQL operations in the project.
7 *
8 * This map has several performance disadvantages:
9 * 1. It is not tree-shakeable, so it will include all operations in the project.
10 * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.
11 * 3. It does not support dead code elimination, so it will add unused operations.
12 *
13 * Therefore it is highly recommended to use the babel or swc plugin for production.
14 */
15const documents = {
16 '\n fragment pokemonFields on Pokemon {\n id\n name\n attacks {\n fast {\n damage\n name\n }\n }\n }\n':
17 types.PokemonFieldsFragmentDoc,
18 '\n query Po($id: ID!) {\n pokemon(id: $id) {\n id\n fleeRate\n ...pokemonFields\n attacks {\n special {\n name\n damage\n }\n }\n weight {\n minimum\n maximum\n }\n name\n __typename\n }\n }\n':
19 types.PoDocument,
20};
21
22/**
23 * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
24 *
25 *
26 * @example
27 * ```ts
28 * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);
29 * ```
30 *
31 * The query argument is unknown!
32 * Please regenerate the types.
33 */
34export function graphql(source: string): unknown;
35
36/**
37 * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
38 */
39export function graphql(
40 source: '\n fragment pokemonFields on Pokemon {\n id\n name\n attacks {\n fast {\n damage\n name\n }\n }\n }\n'
41): (typeof documents)['\n fragment pokemonFields on Pokemon {\n id\n name\n attacks {\n fast {\n damage\n name\n }\n }\n }\n'];
42/**
43 * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
44 */
45export function graphql(
46 source: '\n query Po($id: ID!) {\n pokemon(id: $id) {\n id\n fleeRate\n ...pokemonFields\n attacks {\n special {\n name\n damage\n }\n }\n weight {\n minimum\n maximum\n }\n name\n __typename\n }\n }\n'
47): (typeof documents)['\n query Po($id: ID!) {\n pokemon(id: $id) {\n id\n fleeRate\n ...pokemonFields\n attacks {\n special {\n name\n damage\n }\n }\n weight {\n minimum\n maximum\n }\n name\n __typename\n }\n }\n'];
48
49export function graphql(source: string) {
50 return (documents as any)[source] ?? {};
51}
52
53export type DocumentType<TDocumentNode extends DocumentNode<any, any>> =
54 TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;