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 '\n query Pok {\n pokemons {\n name\n maxCP\n maxHP\n fleeRate\n }\n }\n ':
21 types.PokDocument,
22};
23
24/**
25 * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
26 *
27 *
28 * @example
29 * ```ts
30 * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);
31 * ```
32 *
33 * The query argument is unknown!
34 * Please regenerate the types.
35 */
36export function graphql(source: string): unknown;
37
38/**
39 * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
40 */
41export function graphql(
42 source: '\n fragment pokemonFields on Pokemon {\n id\n name\n attacks {\n fast {\n damage\n name\n }\n }\n }\n'
43): (typeof documents)['\n fragment pokemonFields on Pokemon {\n id\n name\n attacks {\n fast {\n damage\n name\n }\n }\n }\n'];
44/**
45 * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
46 */
47export function graphql(
48 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'
49): (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'];
50/**
51 * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
52 */
53export function graphql(
54 source: '\n query Pok {\n pokemons {\n name\n maxCP\n maxHP\n fleeRate\n }\n }\n '
55): (typeof documents)['\n query Pok {\n pokemons {\n name\n maxCP\n maxHP\n fleeRate\n }\n }\n '];
56
57export function graphql(source: string) {
58 return (documents as any)[source] ?? {};
59}
60
61export type DocumentType<TDocumentNode extends DocumentNode<any, any>> =
62 TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;