github.com/99designs/gqlgen@v0.17.45/integration/src/generated/gql.ts (about) 1 /* eslint-disable */ 2 import * as types from './graphql'; 3 import { 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 */ 15 const documents = { 16 "query coercion($value: [ListCoercion!]) {\n coercion(value: $value)\n}": types.CoercionDocument, 17 "query complexity($value: Int!) {\n complexity(value: $value)\n}": types.ComplexityDocument, 18 "query date($filter: DateFilter!) {\n date(filter: $filter)\n}": types.DateDocument, 19 "query error($type: ErrorType) {\n error(type: $type)\n}": types.ErrorDocument, 20 "query jsonEncoding {\n jsonEncoding\n}": types.JsonEncodingDocument, 21 "query path {\n path {\n cc: child {\n error\n }\n }\n}": types.PathDocument, 22 "query viewer {\n viewer {\n user {\n name\n phoneNumber\n query {\n jsonEncoding\n }\n ...userFragment @defer\n }\n }\n}\n\nfragment userFragment on User {\n likes\n}": types.ViewerDocument, 23 }; 24 25 /** 26 * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. 27 * 28 * 29 * @example 30 * ```ts 31 * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`); 32 * ``` 33 * 34 * The query argument is unknown! 35 * Please regenerate the types. 36 */ 37 export function graphql(source: string): unknown; 38 39 /** 40 * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. 41 */ 42 export function graphql(source: "query coercion($value: [ListCoercion!]) {\n coercion(value: $value)\n}"): (typeof documents)["query coercion($value: [ListCoercion!]) {\n coercion(value: $value)\n}"]; 43 /** 44 * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. 45 */ 46 export function graphql(source: "query complexity($value: Int!) {\n complexity(value: $value)\n}"): (typeof documents)["query complexity($value: Int!) {\n complexity(value: $value)\n}"]; 47 /** 48 * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. 49 */ 50 export function graphql(source: "query date($filter: DateFilter!) {\n date(filter: $filter)\n}"): (typeof documents)["query date($filter: DateFilter!) {\n date(filter: $filter)\n}"]; 51 /** 52 * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. 53 */ 54 export function graphql(source: "query error($type: ErrorType) {\n error(type: $type)\n}"): (typeof documents)["query error($type: ErrorType) {\n error(type: $type)\n}"]; 55 /** 56 * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. 57 */ 58 export function graphql(source: "query jsonEncoding {\n jsonEncoding\n}"): (typeof documents)["query jsonEncoding {\n jsonEncoding\n}"]; 59 /** 60 * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. 61 */ 62 export function graphql(source: "query path {\n path {\n cc: child {\n error\n }\n }\n}"): (typeof documents)["query path {\n path {\n cc: child {\n error\n }\n }\n}"]; 63 /** 64 * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. 65 */ 66 export function graphql(source: "query viewer {\n viewer {\n user {\n name\n phoneNumber\n query {\n jsonEncoding\n }\n ...userFragment @defer\n }\n }\n}\n\nfragment userFragment on User {\n likes\n}"): (typeof documents)["query viewer {\n viewer {\n user {\n name\n phoneNumber\n query {\n jsonEncoding\n }\n ...userFragment @defer\n }\n }\n}\n\nfragment userFragment on User {\n likes\n}"]; 67 68 export function graphql(source: string) { 69 return (documents as any)[source] ?? {}; 70 } 71 72 export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;