diff --git a/webui2/codegen.ts b/webui2/codegen.ts index cb0e88c41239f57633d7ed4e900700ae78503a0e..fbef3f70085fa9114cb654e5014305d7b705c076 100644 --- a/webui2/codegen.ts +++ b/webui2/codegen.ts @@ -1,16 +1,25 @@ import type { CodegenConfig } from "@graphql-codegen/cli"; const config: CodegenConfig = { + overwrite: true, schema: "../api/graphql/schema/*.graphql", - documents: ["src/graphql/**/*.graphql", "src/components/**/*.graphql"], + documents: ["src/**/*.{ts,tsx}", "!src/__generated__/**/*"], + ignoreNoDocuments: true, generates: { - "src/__generated__/graphql.ts": { - plugins: ["typescript", "typescript-operations", "typescript-react-apollo"], + "./src/__generated__/": { + preset: "client", + presetConfig: { + fragmentMasking: false, + }, config: { - withHooks: true, - withComponent: false, - withHOC: false, - apolloReactHooksImportFrom: "@apollo/client/react", + useTypeImports: true, + avoidOptionals: { + field: true, + inputValue: false, + }, + defaultScalarType: "unknown", + nonOptionalTypename: true, + skipTypeNameForRoot: true, scalars: { Time: "string", Hash: "string", diff --git a/webui2/package.json b/webui2/package.json index 74519ceb86972a58dfdf8dc7cb510045146f5452..b616312b597714c36d094a93af000ce9091c0014 100644 --- a/webui2/package.json +++ b/webui2/package.json @@ -19,7 +19,7 @@ "build-storybook": "storybook build" }, "dependencies": { - "@apollo/client": "^4.1.6", + "@apollo/client": "^4.1.7", "@base-ui/react": "^1.3.0", "@floating-ui/react": "^0.27.19", "@fontsource-variable/geist": "^5.2.8", @@ -52,9 +52,8 @@ }, "devDependencies": { "@graphql-codegen/cli": "^6.2.1", - "@graphql-codegen/typescript": "^5.0.9", - "@graphql-codegen/typescript-operations": "^5.0.9", - "@graphql-codegen/typescript-react-apollo": "^4.3.2", + "@graphql-codegen/client-preset": "^5.2.4", + "@graphql-typed-document-node/core": "^3.2.0", "@storybook/addon-a11y": "^10.3.4", "@storybook/addon-vitest": "^10.3.4", "@storybook/react": "^10.3.4", diff --git a/webui2/pnpm-lock.yaml b/webui2/pnpm-lock.yaml index b464eaa849a75b0def989dfbed12431335029787..0da51ad4b52fb499e647f0547ba64b6180ea18fc 100644 --- a/webui2/pnpm-lock.yaml +++ b/webui2/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@apollo/client': - specifier: ^4.1.6 - version: 4.1.6(graphql-ws@6.0.8(graphql@16.13.2)(ws@8.20.0))(graphql@16.13.2)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(rxjs@7.8.2) + specifier: ^4.1.7 + version: 4.1.7(graphql-ws@6.0.8(graphql@16.13.2)(ws@8.20.0))(graphql@16.13.2)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(rxjs@7.8.2) '@base-ui/react': specifier: ^1.3.0 version: 1.3.0(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) @@ -102,15 +102,12 @@ importers: '@graphql-codegen/cli': specifier: ^6.2.1 version: 6.2.1(@types/node@25.5.0)(graphql@16.13.2)(typescript@6.0.2) - '@graphql-codegen/typescript': - specifier: ^5.0.9 - version: 5.0.9(graphql@16.13.2) - '@graphql-codegen/typescript-operations': - specifier: ^5.0.9 - version: 5.0.9(graphql@16.13.2) - '@graphql-codegen/typescript-react-apollo': - specifier: ^4.3.2 - version: 4.4.1(graphql@16.13.2) + '@graphql-codegen/client-preset': + specifier: ^5.2.4 + version: 5.2.4(graphql@16.13.2) + '@graphql-typed-document-node/core': + specifier: ^3.2.0 + version: 3.2.0(graphql@16.13.2) '@storybook/addon-a11y': specifier: ^10.3.4 version: 10.3.4(storybook@10.3.4(@testing-library/dom@10.4.1)(prettier@3.8.1)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)) @@ -210,8 +207,8 @@ packages: '@adobe/css-tools@4.4.4': resolution: {integrity: sha512-Elp+iwUx5rN5+Y8xLt5/GRoG20WGoDCQ/1Fb+1LiGtvwbDavuSk0jhD/eZdckHAuzcDzccnkv+rEjyWfRx18gg==} - '@apollo/client@4.1.6': - resolution: {integrity: sha512-ak8uzqmKeX3u9BziGf83RRyODAJKFkPG72hTNvEj4WjMWFmuKW2gGN1i3OfajKT6yuGjvo+n23ES2zqWDKFCZg==} + '@apollo/client@4.1.7': + resolution: {integrity: sha512-CE1Pe22vszRBMGrBOovIXzTa5infy1kwF0kWX2JBLcGFXoOPBOAo9zoM++tuSRZr8PscWJyv2ka2FKoyEquEHw==} peerDependencies: graphql: ^16.0.0 graphql-ws: ^5.5.5 || ^6.0.3 @@ -234,12 +231,12 @@ packages: peerDependencies: graphql: '*' - '@asamuzakjp/css-color@5.1.5': - resolution: {integrity: sha512-8cMAA1bE66Mb/tfmkhcfJLjEPgyT7SSy6lW6id5XL113ai1ky76d/1L27sGnXCMsLfq66DInAU3OzuahB4lu9Q==} + '@asamuzakjp/css-color@5.1.8': + resolution: {integrity: sha512-OISPR9c2uPo23rUdvfEQiLPjoMLOpEeLNnP5iGkxr6tDDxJd3NjD+6fxY0mdaMbIPUjFGL4HFOJqLvow5q4aqQ==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} - '@asamuzakjp/dom-selector@7.0.6': - resolution: {integrity: sha512-Tgmk6EQM0nc9xvp7sEHRVavbknhb/vGKht+04yAT3t5KQwZ02CSobCtcFgaHH04ZrjD1BhEKNA8tRhzFV20gkA==} + '@asamuzakjp/dom-selector@7.0.8': + resolution: {integrity: sha512-erMO6FgtM02dC24NGm0xufMzWz5OF0wXKR7BpvGD973bq/GbmR8/DbxNZbj0YevQ5hlToJaWSVK/G9/NDgGEVw==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} '@asamuzakjp/nwsapi@2.3.9': @@ -649,24 +646,24 @@ packages: resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.23.4': - resolution: {integrity: sha512-lf19F24LSMfF8weXvW5QEtnLqW70u7kgit5e9PSx0MsHAFclGd1T9ynvWEMDT1w5J4Qt54tomGeAhdoAku1Xow==} + '@eslint/config-array@0.23.5': + resolution: {integrity: sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/config-helpers@0.5.4': - resolution: {integrity: sha512-jJhqiY3wPMlWWO3370M86CPJ7pt8GmEwSLglMfQhjXal07RCvhmU0as4IuUEW5SJeunfItiEetHmSxCCe9lDBg==} + '@eslint/config-helpers@0.5.5': + resolution: {integrity: sha512-eIJYKTCECbP/nsKaaruF6LW967mtbQbsw4JTtSVkUQc9MneSkbrgPJAbKl9nWr0ZeowV8BfsarBmPpBzGelA2w==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/core@1.2.0': - resolution: {integrity: sha512-8FTGbNzTvmSlc4cZBaShkC6YvFMG0riksYWRFKXztqVdXaQbcZLXlFbSpC05s70sGEsXAw0qwhx69JiW7hQS7A==} + '@eslint/core@1.2.1': + resolution: {integrity: sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/object-schema@3.0.4': - resolution: {integrity: sha512-55lO/7+Yp0ISKRP0PsPtNTeNGapXaO085aELZmWCVc5SH3jfrqpuU6YgOdIxMS99ZHkQN1cXKE+cdIqwww9ptw==} + '@eslint/object-schema@3.0.5': + resolution: {integrity: sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/plugin-kit@0.7.0': - resolution: {integrity: sha512-ejvBr8MQCbVsWNZnCwDXjUKq40MDmHalq7cJ6e9s/qzTUFIIo/afzt1Vui9T97FM/V/pN4YsFVoed5NIa96RDg==} + '@eslint/plugin-kit@0.7.1': + resolution: {integrity: sha512-rZAP3aVgB9ds9KOeUSL+zZ21hPmo8dh6fnIFwRQj5EAZl9gzR7wxYbYXYysAM8CTqGmUGyp2S4kUdV17MnGuWQ==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} '@exodus/bytes@1.15.0': @@ -772,12 +769,6 @@ packages: graphql-sock: optional: true - '@graphql-codegen/typescript-react-apollo@4.4.1': - resolution: {integrity: sha512-lrjUfDCNlCWQU07jO6EvZE8I2OLfJl9XKKGCcol27OhW6B9xaUEPaId+TvL6o/NfV+T4z4eQ/Y8BuKWyYjD+mQ==} - engines: {node: '>= 16.0.0'} - peerDependencies: - graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 - '@graphql-codegen/typescript@5.0.9': resolution: {integrity: sha512-YlIZ4nqdFdzr5vxuNtQtZnnMYuZ5cLYB2HaGhGI2zvqHxCmkBjIRpu/5sfccawKy23wetV+aoWvoNqxGKIryig==} engines: {node: '>=16'} @@ -3558,6 +3549,10 @@ packages: resolution: {integrity: sha512-aY/R+aEsRelme17KGQa/1ZSIpLpNYYrhcrepKTZgE+W3WM16YMCaPwOHLHsmopZHELU0Ojin1lPVxKR0MihncA==} engines: {node: 20 || >=22} + lru-cache@11.3.3: + resolution: {integrity: sha512-JvNw9Y81y33E+BEYPr0U7omo+U9AySnsMsEiXgwT6yqd31VQWTLNQqmT4ou5eqPFUrTfIDFta2wKhB1hyohtAQ==} + engines: {node: 20 || >=22} + lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} @@ -3775,6 +3770,10 @@ packages: resolution: {integrity: sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==} engines: {node: 18 || 20 || >=22} + minimatch@10.2.5: + resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==} + engines: {node: 18 || 20 || >=22} + minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -4970,7 +4969,7 @@ snapshots: '@adobe/css-tools@4.4.4': {} - '@apollo/client@4.1.6(graphql-ws@6.0.8(graphql@16.13.2)(ws@8.20.0))(graphql@16.13.2)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(rxjs@7.8.2)': + '@apollo/client@4.1.7(graphql-ws@6.0.8(graphql@16.13.2)(ws@8.20.0))(graphql@16.13.2)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(rxjs@7.8.2)': dependencies: '@graphql-typed-document-node/core': 3.2.0(graphql@16.13.2) '@wry/caches': 1.0.1 @@ -4993,22 +4992,20 @@ snapshots: immutable: 5.1.5 invariant: 2.2.4 - '@asamuzakjp/css-color@5.1.5': + '@asamuzakjp/css-color@5.1.8': dependencies: '@csstools/css-calc': 3.1.1(@csstools/css-parser-algorithms@4.0.0(@csstools/css-tokenizer@4.0.0))(@csstools/css-tokenizer@4.0.0) '@csstools/css-color-parser': 4.0.2(@csstools/css-parser-algorithms@4.0.0(@csstools/css-tokenizer@4.0.0))(@csstools/css-tokenizer@4.0.0) '@csstools/css-parser-algorithms': 4.0.0(@csstools/css-tokenizer@4.0.0) '@csstools/css-tokenizer': 4.0.0 - lru-cache: 11.2.7 optional: true - '@asamuzakjp/dom-selector@7.0.6': + '@asamuzakjp/dom-selector@7.0.8': dependencies: '@asamuzakjp/nwsapi': 2.3.9 bidi-js: 1.0.3 css-tree: 3.2.1 is-potential-custom-element-name: 1.0.1 - lru-cache: 11.2.7 optional: true '@asamuzakjp/nwsapi@2.3.9': @@ -5405,27 +5402,27 @@ snapshots: '@eslint-community/regexpp@4.12.2': {} - '@eslint/config-array@0.23.4': + '@eslint/config-array@0.23.5': dependencies: - '@eslint/object-schema': 3.0.4 + '@eslint/object-schema': 3.0.5 debug: 4.4.3 - minimatch: 10.2.4 + minimatch: 10.2.5 transitivePeerDependencies: - supports-color - '@eslint/config-helpers@0.5.4': + '@eslint/config-helpers@0.5.5': dependencies: - '@eslint/core': 1.2.0 + '@eslint/core': 1.2.1 - '@eslint/core@1.2.0': + '@eslint/core@1.2.1': dependencies: '@types/json-schema': 7.0.15 - '@eslint/object-schema@3.0.4': {} + '@eslint/object-schema@3.0.5': {} - '@eslint/plugin-kit@0.7.0': + '@eslint/plugin-kit@0.7.1': dependencies: - '@eslint/core': 1.2.0 + '@eslint/core': 1.2.1 levn: 0.4.1 '@exodus/bytes@1.15.0(@noble/hashes@1.8.0)': @@ -5586,15 +5583,6 @@ snapshots: graphql: 16.13.2 tslib: 2.6.3 - '@graphql-codegen/typescript-react-apollo@4.4.1(graphql@16.13.2)': - dependencies: - '@graphql-codegen/plugin-helpers': 6.2.0(graphql@16.13.2) - '@graphql-codegen/visitor-plugin-common': 6.2.4(graphql@16.13.2) - auto-bind: 4.0.0 - change-case-all: 1.0.15 - graphql: 16.13.2 - tslib: 2.8.1 - '@graphql-codegen/typescript@5.0.9(graphql@16.13.2)': dependencies: '@graphql-codegen/plugin-helpers': 6.2.0(graphql@16.13.2) @@ -7563,10 +7551,10 @@ snapshots: dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@10.2.0(jiti@2.6.1)) '@eslint-community/regexpp': 4.12.2 - '@eslint/config-array': 0.23.4 - '@eslint/config-helpers': 0.5.4 - '@eslint/core': 1.2.0 - '@eslint/plugin-kit': 0.7.0 + '@eslint/config-array': 0.23.5 + '@eslint/config-helpers': 0.5.5 + '@eslint/core': 1.2.1 + '@eslint/plugin-kit': 0.7.1 '@humanfs/node': 0.16.7 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.4.3 @@ -7588,7 +7576,7 @@ snapshots: imurmurhash: 0.1.4 is-glob: 4.0.3 json-stable-stringify-without-jsonify: 1.0.1 - minimatch: 10.2.4 + minimatch: 10.2.5 natural-compare: 1.4.0 optionator: 0.9.4 optionalDependencies: @@ -8229,8 +8217,8 @@ snapshots: jsdom@29.0.1(@noble/hashes@1.8.0): dependencies: - '@asamuzakjp/css-color': 5.1.5 - '@asamuzakjp/dom-selector': 7.0.6 + '@asamuzakjp/css-color': 5.1.8 + '@asamuzakjp/dom-selector': 7.0.8 '@bramus/specificity': 2.4.2 '@csstools/css-syntax-patches-for-csstree': 1.1.2(css-tree@3.2.1) '@exodus/bytes': 1.15.0(@noble/hashes@1.8.0) @@ -8239,7 +8227,7 @@ snapshots: decimal.js: 10.6.0 html-encoding-sniffer: 6.0.0(@noble/hashes@1.8.0) is-potential-custom-element-name: 1.0.1 - lru-cache: 11.2.7 + lru-cache: 11.3.3 parse5: 8.0.0 saxes: 6.0.0 symbol-tree: 3.2.4 @@ -8398,6 +8386,9 @@ snapshots: lru-cache@11.2.7: {} + lru-cache@11.3.3: + optional: true + lru-cache@5.1.1: dependencies: yallist: 3.1.1 @@ -8808,6 +8799,10 @@ snapshots: dependencies: brace-expansion: 5.0.5 + minimatch@10.2.5: + dependencies: + brace-expansion: 5.0.5 + minimist@1.2.8: {} minipass@7.1.3: {} diff --git a/webui2/src/__generated__/fragment-masking.ts b/webui2/src/__generated__/fragment-masking.ts new file mode 100644 index 0000000000000000000000000000000000000000..743a364fe18825e3846876f754c74739dcd719ad --- /dev/null +++ b/webui2/src/__generated__/fragment-masking.ts @@ -0,0 +1,87 @@ +/* eslint-disable */ +import type { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core'; +import type { FragmentDefinitionNode } from 'graphql'; +import type { Incremental } from './graphql'; + + +export type FragmentType> = TDocumentType extends DocumentTypeDecoration< + infer TType, + any +> + ? [TType] extends [{ ' $fragmentName'?: infer TKey }] + ? TKey extends string + ? { ' $fragmentRefs'?: { [key in TKey]: TType } } + : never + : never + : never; + +// return non-nullable if `fragmentType` is non-nullable +export function useFragment( + _documentNode: DocumentTypeDecoration, + fragmentType: FragmentType> +): TType; +// return nullable if `fragmentType` is undefined +export function useFragment( + _documentNode: DocumentTypeDecoration, + fragmentType: FragmentType> | undefined +): TType | undefined; +// return nullable if `fragmentType` is nullable +export function useFragment( + _documentNode: DocumentTypeDecoration, + fragmentType: FragmentType> | null +): TType | null; +// return nullable if `fragmentType` is nullable or undefined +export function useFragment( + _documentNode: DocumentTypeDecoration, + fragmentType: FragmentType> | null | undefined +): TType | null | undefined; +// return array of non-nullable if `fragmentType` is array of non-nullable +export function useFragment( + _documentNode: DocumentTypeDecoration, + fragmentType: Array>> +): Array; +// return array of nullable if `fragmentType` is array of nullable +export function useFragment( + _documentNode: DocumentTypeDecoration, + fragmentType: Array>> | null | undefined +): Array | null | undefined; +// return readonly array of non-nullable if `fragmentType` is array of non-nullable +export function useFragment( + _documentNode: DocumentTypeDecoration, + fragmentType: ReadonlyArray>> +): ReadonlyArray; +// return readonly array of nullable if `fragmentType` is array of nullable +export function useFragment( + _documentNode: DocumentTypeDecoration, + fragmentType: ReadonlyArray>> | null | undefined +): ReadonlyArray | null | undefined; +export function useFragment( + _documentNode: DocumentTypeDecoration, + fragmentType: FragmentType> | Array>> | ReadonlyArray>> | null | undefined +): TType | Array | ReadonlyArray | null | undefined { + return fragmentType as any; +} + + +export function makeFragmentData< + F extends DocumentTypeDecoration, + FT extends ResultOf +>(data: FT, _fragment: F): FragmentType { + return data as FragmentType; +} +export function isFragmentReady( + queryNode: DocumentTypeDecoration, + fragmentNode: TypedDocumentNode, + data: FragmentType, any>> | null | undefined +): data is FragmentType { + const deferredFields = (queryNode as { __meta__?: { deferredFields: Record } }).__meta__ + ?.deferredFields; + + if (!deferredFields) return true; + + const fragDef = fragmentNode.definitions[0] as FragmentDefinitionNode | undefined; + const fragName = fragDef?.name?.value; + + const fields = (fragName && deferredFields[fragName]) || []; + return fields.length > 0 && fields.every(field => data && field in data); +} diff --git a/webui2/src/__generated__/gql.ts b/webui2/src/__generated__/gql.ts new file mode 100644 index 0000000000000000000000000000000000000000..524c6de12f471c9a4d88121b494ce0abefcfa246 --- /dev/null +++ b/webui2/src/__generated__/gql.ts @@ -0,0 +1,232 @@ +/* eslint-disable */ +import * as types from './graphql'; +import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; + +/** + * Map of all GraphQL operations in the project. + * + * This map has several performance disadvantages: + * 1. It is not tree-shakeable, so it will include all operations in the project. + * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle. + * 3. It does not support dead code elimination, so it will add unused operations. + * + * Therefore it is highly recommended to use the babel or swc plugin for production. + * Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size + */ +type Documents = { + "\n mutation BugAddComment($input: BugAddCommentInput!) {\n bugAddComment(input: $input) {\n bug {\n id\n }\n }\n }\n": typeof types.BugAddCommentDocument, + "\n mutation BugAddCommentAndClose($input: BugAddCommentAndCloseInput!) {\n bugAddCommentAndClose(input: $input) {\n bug {\n id\n }\n }\n }\n": typeof types.BugAddCommentAndCloseDocument, + "\n mutation BugAddCommentAndReopen($input: BugAddCommentAndReopenInput!) {\n bugAddCommentAndReopen(input: $input) {\n bug {\n id\n }\n }\n }\n": typeof types.BugAddCommentAndReopenDocument, + "\n mutation BugStatusOpen($input: BugStatusOpenInput!) {\n bugStatusOpen(input: $input) {\n bug {\n id\n status\n }\n }\n }\n": typeof types.BugStatusOpenDocument, + "\n mutation BugStatusClose($input: BugStatusCloseInput!) {\n bugStatusClose(input: $input) {\n bug {\n id\n status\n }\n }\n }\n": typeof types.BugStatusCloseDocument, + "\n mutation BugChangeLabels($input: BugChangeLabelInput) {\n bugChangeLabels(input: $input) {\n bug {\n id\n labels {\n name\n color {\n R\n G\n B\n }\n }\n }\n }\n }\n": typeof types.BugChangeLabelsDocument, + "\n fragment BugCreateCommentFields on BugCreateTimelineItem {\n author {\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n": typeof types.BugCreateCommentFieldsFragmentDoc, + "\n fragment BugAddCommentFields on BugAddCommentTimelineItem {\n author {\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n": typeof types.BugAddCommentFieldsFragmentDoc, + "\n fragment LabelChangeFields on BugLabelChangeTimelineItem {\n author {\n humanId\n displayName\n }\n date\n added {\n ...LabelFields\n }\n removed {\n ...LabelFields\n }\n }\n": typeof types.LabelChangeFieldsFragmentDoc, + "\n fragment StatusChangeFields on BugSetStatusTimelineItem {\n author {\n humanId\n displayName\n }\n date\n status\n }\n": typeof types.StatusChangeFieldsFragmentDoc, + "\n fragment TitleChangeFields on BugSetTitleTimelineItem {\n author {\n humanId\n displayName\n }\n date\n title\n was\n }\n": typeof types.TitleChangeFieldsFragmentDoc, + "\n mutation BugEditComment($input: BugEditCommentInput!) {\n bugEditComment(input: $input) {\n bug {\n id\n }\n }\n }\n": typeof types.BugEditCommentDocument, + "\n mutation BugSetTitle($input: BugSetTitleInput!) {\n bugSetTitle(input: $input) {\n bug {\n id\n title\n }\n }\n }\n": typeof types.BugSetTitleDocument, + "\n query CommitList($repo: String, $ref: String!, $path: String, $after: String, $first: Int) {\n repository(ref: $repo) {\n commits(ref: $ref, path: $path, after: $after, first: $first) {\n nodes {\n hash\n shortHash\n message\n authorName\n date\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n": typeof types.CommitListDocument, + "\n query FileDiff($repo: String, $hash: String!, $path: String!) {\n repository(ref: $repo) {\n commit(hash: $hash) {\n diff(path: $path) {\n path\n oldPath\n isBinary\n isNew\n isDelete\n hunks {\n oldStart\n oldLines\n newStart\n newLines\n lines {\n type\n content\n oldLine\n newLine\n }\n }\n }\n }\n }\n }\n": typeof types.FileDiffDocument, + "\n fragment IdentitySummary on Identity {\n id\n humanId\n displayName\n avatarUrl\n }\n": typeof types.IdentitySummaryFragmentDoc, + "\n fragment BugSummary on Bug {\n id\n humanId\n status\n title\n labels {\n ...LabelFields\n }\n author {\n ...IdentitySummary\n }\n createdAt\n comments {\n totalCount\n }\n }\n": typeof types.BugSummaryFragmentDoc, + "\n fragment LabelFields on Label {\n name\n color {\n R\n G\n B\n }\n }\n": typeof types.LabelFieldsFragmentDoc, + "\n query UserIdentity {\n repository {\n userIdentity {\n id\n humanId\n name\n displayName\n avatarUrl\n email\n login\n }\n }\n }\n": typeof types.UserIdentityDocument, + "\n query CodePageRefs($repo: String) {\n repository(ref: $repo) {\n name\n head {\n shortName\n }\n refs {\n nodes {\n name\n shortName\n type\n hash\n }\n }\n }\n }\n": typeof types.CodePageRefsDocument, + "\n query CodePageBlob($repo: String, $ref: String!, $path: String!) {\n repository(ref: $repo) {\n blob(ref: $ref, path: $path) {\n path\n hash\n text\n size\n isBinary\n isTruncated\n }\n }\n }\n": typeof types.CodePageBlobDocument, + "\n query CodePageTree($repo: String, $ref: String!, $path: String) {\n repository(ref: $repo) {\n tree(ref: $ref, path: $path) {\n name\n type\n hash\n }\n }\n }\n": typeof types.CodePageTreeDocument, + "\n query CodePageLastCommits(\n $repo: String\n $ref: String!\n $path: String\n $names: [String!]!\n ) {\n repository(ref: $repo) {\n lastCommits(ref: $ref, path: $path, names: $names) {\n name\n commit {\n hash\n shortHash\n message\n date\n }\n }\n }\n }\n": typeof types.CodePageLastCommitsDocument, + "\n query CodePageReadme($repo: String, $ref: String!, $path: String!) {\n repository(ref: $repo) {\n blob(ref: $ref, path: $path) {\n text\n }\n }\n }\n": typeof types.CodePageReadmeDocument, + "\n query AllIdentities($ref: String) {\n repository(ref: $ref) {\n allIdentities(first: 1000) {\n nodes {\n id\n humanId\n name\n email\n login\n displayName\n avatarUrl\n }\n }\n }\n }\n": typeof types.AllIdentitiesDocument, + "\n query ValidLabels($ref: String) {\n repository(ref: $ref) {\n validLabels {\n nodes {\n name\n color {\n R\n G\n B\n }\n }\n }\n }\n }\n": typeof types.ValidLabelsDocument, + "\n query BugDetail($ref: String, $prefix: String!) {\n repository(ref: $ref) {\n bug(prefix: $prefix) {\n ...BugSummary\n lastEdit\n participants(first: 20) {\n nodes {\n ...IdentitySummary\n }\n }\n timeline(first: 250) {\n nodes {\n __typename\n id\n ... on BugCreateTimelineItem {\n ...BugCreateCommentFields\n }\n ... on BugAddCommentTimelineItem {\n ...BugAddCommentFields\n }\n ... on BugLabelChangeTimelineItem {\n ...LabelChangeFields\n }\n ... on BugSetStatusTimelineItem {\n ...StatusChangeFields\n }\n ... on BugSetTitleTimelineItem {\n ...TitleChangeFields\n }\n }\n }\n }\n }\n }\n": typeof types.BugDetailDocument, + "\n query BugList(\n $ref: String\n $openQuery: String!\n $closedQuery: String!\n $listQuery: String!\n $first: Int\n $after: String\n ) {\n repository(ref: $ref) {\n openCount: allBugs(query: $openQuery, first: 1) {\n totalCount\n }\n closedCount: allBugs(query: $closedQuery, first: 1) {\n totalCount\n }\n bugs: allBugs(query: $listQuery, first: $first, after: $after) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...BugSummary\n }\n }\n }\n }\n": typeof types.BugListDocument, + "\n mutation BugCreate($input: BugCreateInput!) {\n bugCreate(input: $input) {\n bug {\n id\n humanId\n }\n }\n }\n": typeof types.BugCreateDocument, + "\n query UserProfile(\n $ref: String\n $prefix: String!\n $openQuery: String!\n $closedQuery: String!\n $listQuery: String!\n $after: String\n ) {\n repository(ref: $ref) {\n identity(prefix: $prefix) {\n id\n humanId\n name\n email\n login\n displayName\n avatarUrl\n isProtected\n }\n openCount: allBugs(query: $openQuery, first: 1) {\n totalCount\n }\n closedCount: allBugs(query: $closedQuery, first: 1) {\n totalCount\n }\n bugs: allBugs(query: $listQuery, first: 25, after: $after) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...BugSummary\n }\n }\n }\n }\n": typeof types.UserProfileDocument, + "\n query CommitPageDetail($repo: String, $hash: String!) {\n repository(ref: $repo) {\n commit(hash: $hash) {\n hash\n shortHash\n message\n fullMessage\n authorName\n authorEmail\n date\n parents\n files {\n nodes {\n path\n oldPath\n status\n }\n }\n }\n }\n }\n": typeof types.CommitPageDetailDocument, + "\n query Repositories {\n repositories {\n nodes {\n name\n }\n totalCount\n }\n }\n": typeof types.RepositoriesDocument, +}; +const documents: Documents = { + "\n mutation BugAddComment($input: BugAddCommentInput!) {\n bugAddComment(input: $input) {\n bug {\n id\n }\n }\n }\n": types.BugAddCommentDocument, + "\n mutation BugAddCommentAndClose($input: BugAddCommentAndCloseInput!) {\n bugAddCommentAndClose(input: $input) {\n bug {\n id\n }\n }\n }\n": types.BugAddCommentAndCloseDocument, + "\n mutation BugAddCommentAndReopen($input: BugAddCommentAndReopenInput!) {\n bugAddCommentAndReopen(input: $input) {\n bug {\n id\n }\n }\n }\n": types.BugAddCommentAndReopenDocument, + "\n mutation BugStatusOpen($input: BugStatusOpenInput!) {\n bugStatusOpen(input: $input) {\n bug {\n id\n status\n }\n }\n }\n": types.BugStatusOpenDocument, + "\n mutation BugStatusClose($input: BugStatusCloseInput!) {\n bugStatusClose(input: $input) {\n bug {\n id\n status\n }\n }\n }\n": types.BugStatusCloseDocument, + "\n mutation BugChangeLabels($input: BugChangeLabelInput) {\n bugChangeLabels(input: $input) {\n bug {\n id\n labels {\n name\n color {\n R\n G\n B\n }\n }\n }\n }\n }\n": types.BugChangeLabelsDocument, + "\n fragment BugCreateCommentFields on BugCreateTimelineItem {\n author {\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n": types.BugCreateCommentFieldsFragmentDoc, + "\n fragment BugAddCommentFields on BugAddCommentTimelineItem {\n author {\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n": types.BugAddCommentFieldsFragmentDoc, + "\n fragment LabelChangeFields on BugLabelChangeTimelineItem {\n author {\n humanId\n displayName\n }\n date\n added {\n ...LabelFields\n }\n removed {\n ...LabelFields\n }\n }\n": types.LabelChangeFieldsFragmentDoc, + "\n fragment StatusChangeFields on BugSetStatusTimelineItem {\n author {\n humanId\n displayName\n }\n date\n status\n }\n": types.StatusChangeFieldsFragmentDoc, + "\n fragment TitleChangeFields on BugSetTitleTimelineItem {\n author {\n humanId\n displayName\n }\n date\n title\n was\n }\n": types.TitleChangeFieldsFragmentDoc, + "\n mutation BugEditComment($input: BugEditCommentInput!) {\n bugEditComment(input: $input) {\n bug {\n id\n }\n }\n }\n": types.BugEditCommentDocument, + "\n mutation BugSetTitle($input: BugSetTitleInput!) {\n bugSetTitle(input: $input) {\n bug {\n id\n title\n }\n }\n }\n": types.BugSetTitleDocument, + "\n query CommitList($repo: String, $ref: String!, $path: String, $after: String, $first: Int) {\n repository(ref: $repo) {\n commits(ref: $ref, path: $path, after: $after, first: $first) {\n nodes {\n hash\n shortHash\n message\n authorName\n date\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n": types.CommitListDocument, + "\n query FileDiff($repo: String, $hash: String!, $path: String!) {\n repository(ref: $repo) {\n commit(hash: $hash) {\n diff(path: $path) {\n path\n oldPath\n isBinary\n isNew\n isDelete\n hunks {\n oldStart\n oldLines\n newStart\n newLines\n lines {\n type\n content\n oldLine\n newLine\n }\n }\n }\n }\n }\n }\n": types.FileDiffDocument, + "\n fragment IdentitySummary on Identity {\n id\n humanId\n displayName\n avatarUrl\n }\n": types.IdentitySummaryFragmentDoc, + "\n fragment BugSummary on Bug {\n id\n humanId\n status\n title\n labels {\n ...LabelFields\n }\n author {\n ...IdentitySummary\n }\n createdAt\n comments {\n totalCount\n }\n }\n": types.BugSummaryFragmentDoc, + "\n fragment LabelFields on Label {\n name\n color {\n R\n G\n B\n }\n }\n": types.LabelFieldsFragmentDoc, + "\n query UserIdentity {\n repository {\n userIdentity {\n id\n humanId\n name\n displayName\n avatarUrl\n email\n login\n }\n }\n }\n": types.UserIdentityDocument, + "\n query CodePageRefs($repo: String) {\n repository(ref: $repo) {\n name\n head {\n shortName\n }\n refs {\n nodes {\n name\n shortName\n type\n hash\n }\n }\n }\n }\n": types.CodePageRefsDocument, + "\n query CodePageBlob($repo: String, $ref: String!, $path: String!) {\n repository(ref: $repo) {\n blob(ref: $ref, path: $path) {\n path\n hash\n text\n size\n isBinary\n isTruncated\n }\n }\n }\n": types.CodePageBlobDocument, + "\n query CodePageTree($repo: String, $ref: String!, $path: String) {\n repository(ref: $repo) {\n tree(ref: $ref, path: $path) {\n name\n type\n hash\n }\n }\n }\n": types.CodePageTreeDocument, + "\n query CodePageLastCommits(\n $repo: String\n $ref: String!\n $path: String\n $names: [String!]!\n ) {\n repository(ref: $repo) {\n lastCommits(ref: $ref, path: $path, names: $names) {\n name\n commit {\n hash\n shortHash\n message\n date\n }\n }\n }\n }\n": types.CodePageLastCommitsDocument, + "\n query CodePageReadme($repo: String, $ref: String!, $path: String!) {\n repository(ref: $repo) {\n blob(ref: $ref, path: $path) {\n text\n }\n }\n }\n": types.CodePageReadmeDocument, + "\n query AllIdentities($ref: String) {\n repository(ref: $ref) {\n allIdentities(first: 1000) {\n nodes {\n id\n humanId\n name\n email\n login\n displayName\n avatarUrl\n }\n }\n }\n }\n": types.AllIdentitiesDocument, + "\n query ValidLabels($ref: String) {\n repository(ref: $ref) {\n validLabels {\n nodes {\n name\n color {\n R\n G\n B\n }\n }\n }\n }\n }\n": types.ValidLabelsDocument, + "\n query BugDetail($ref: String, $prefix: String!) {\n repository(ref: $ref) {\n bug(prefix: $prefix) {\n ...BugSummary\n lastEdit\n participants(first: 20) {\n nodes {\n ...IdentitySummary\n }\n }\n timeline(first: 250) {\n nodes {\n __typename\n id\n ... on BugCreateTimelineItem {\n ...BugCreateCommentFields\n }\n ... on BugAddCommentTimelineItem {\n ...BugAddCommentFields\n }\n ... on BugLabelChangeTimelineItem {\n ...LabelChangeFields\n }\n ... on BugSetStatusTimelineItem {\n ...StatusChangeFields\n }\n ... on BugSetTitleTimelineItem {\n ...TitleChangeFields\n }\n }\n }\n }\n }\n }\n": types.BugDetailDocument, + "\n query BugList(\n $ref: String\n $openQuery: String!\n $closedQuery: String!\n $listQuery: String!\n $first: Int\n $after: String\n ) {\n repository(ref: $ref) {\n openCount: allBugs(query: $openQuery, first: 1) {\n totalCount\n }\n closedCount: allBugs(query: $closedQuery, first: 1) {\n totalCount\n }\n bugs: allBugs(query: $listQuery, first: $first, after: $after) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...BugSummary\n }\n }\n }\n }\n": types.BugListDocument, + "\n mutation BugCreate($input: BugCreateInput!) {\n bugCreate(input: $input) {\n bug {\n id\n humanId\n }\n }\n }\n": types.BugCreateDocument, + "\n query UserProfile(\n $ref: String\n $prefix: String!\n $openQuery: String!\n $closedQuery: String!\n $listQuery: String!\n $after: String\n ) {\n repository(ref: $ref) {\n identity(prefix: $prefix) {\n id\n humanId\n name\n email\n login\n displayName\n avatarUrl\n isProtected\n }\n openCount: allBugs(query: $openQuery, first: 1) {\n totalCount\n }\n closedCount: allBugs(query: $closedQuery, first: 1) {\n totalCount\n }\n bugs: allBugs(query: $listQuery, first: 25, after: $after) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...BugSummary\n }\n }\n }\n }\n": types.UserProfileDocument, + "\n query CommitPageDetail($repo: String, $hash: String!) {\n repository(ref: $repo) {\n commit(hash: $hash) {\n hash\n shortHash\n message\n fullMessage\n authorName\n authorEmail\n date\n parents\n files {\n nodes {\n path\n oldPath\n status\n }\n }\n }\n }\n }\n": types.CommitPageDetailDocument, + "\n query Repositories {\n repositories {\n nodes {\n name\n }\n totalCount\n }\n }\n": types.RepositoriesDocument, +}; + +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + * + * + * @example + * ```ts + * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`); + * ``` + * + * The query argument is unknown! + * Please regenerate the types. + */ +export function graphql(source: string): unknown; + +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n mutation BugAddComment($input: BugAddCommentInput!) {\n bugAddComment(input: $input) {\n bug {\n id\n }\n }\n }\n"): (typeof documents)["\n mutation BugAddComment($input: BugAddCommentInput!) {\n bugAddComment(input: $input) {\n bug {\n id\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n mutation BugAddCommentAndClose($input: BugAddCommentAndCloseInput!) {\n bugAddCommentAndClose(input: $input) {\n bug {\n id\n }\n }\n }\n"): (typeof documents)["\n mutation BugAddCommentAndClose($input: BugAddCommentAndCloseInput!) {\n bugAddCommentAndClose(input: $input) {\n bug {\n id\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n mutation BugAddCommentAndReopen($input: BugAddCommentAndReopenInput!) {\n bugAddCommentAndReopen(input: $input) {\n bug {\n id\n }\n }\n }\n"): (typeof documents)["\n mutation BugAddCommentAndReopen($input: BugAddCommentAndReopenInput!) {\n bugAddCommentAndReopen(input: $input) {\n bug {\n id\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n mutation BugStatusOpen($input: BugStatusOpenInput!) {\n bugStatusOpen(input: $input) {\n bug {\n id\n status\n }\n }\n }\n"): (typeof documents)["\n mutation BugStatusOpen($input: BugStatusOpenInput!) {\n bugStatusOpen(input: $input) {\n bug {\n id\n status\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n mutation BugStatusClose($input: BugStatusCloseInput!) {\n bugStatusClose(input: $input) {\n bug {\n id\n status\n }\n }\n }\n"): (typeof documents)["\n mutation BugStatusClose($input: BugStatusCloseInput!) {\n bugStatusClose(input: $input) {\n bug {\n id\n status\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n mutation BugChangeLabels($input: BugChangeLabelInput) {\n bugChangeLabels(input: $input) {\n bug {\n id\n labels {\n name\n color {\n R\n G\n B\n }\n }\n }\n }\n }\n"): (typeof documents)["\n mutation BugChangeLabels($input: BugChangeLabelInput) {\n bugChangeLabels(input: $input) {\n bug {\n id\n labels {\n name\n color {\n R\n G\n B\n }\n }\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment BugCreateCommentFields on BugCreateTimelineItem {\n author {\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n"): (typeof documents)["\n fragment BugCreateCommentFields on BugCreateTimelineItem {\n author {\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment BugAddCommentFields on BugAddCommentTimelineItem {\n author {\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n"): (typeof documents)["\n fragment BugAddCommentFields on BugAddCommentTimelineItem {\n author {\n ...IdentitySummary\n }\n message\n createdAt\n lastEdit\n edited\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment LabelChangeFields on BugLabelChangeTimelineItem {\n author {\n humanId\n displayName\n }\n date\n added {\n ...LabelFields\n }\n removed {\n ...LabelFields\n }\n }\n"): (typeof documents)["\n fragment LabelChangeFields on BugLabelChangeTimelineItem {\n author {\n humanId\n displayName\n }\n date\n added {\n ...LabelFields\n }\n removed {\n ...LabelFields\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment StatusChangeFields on BugSetStatusTimelineItem {\n author {\n humanId\n displayName\n }\n date\n status\n }\n"): (typeof documents)["\n fragment StatusChangeFields on BugSetStatusTimelineItem {\n author {\n humanId\n displayName\n }\n date\n status\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment TitleChangeFields on BugSetTitleTimelineItem {\n author {\n humanId\n displayName\n }\n date\n title\n was\n }\n"): (typeof documents)["\n fragment TitleChangeFields on BugSetTitleTimelineItem {\n author {\n humanId\n displayName\n }\n date\n title\n was\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n mutation BugEditComment($input: BugEditCommentInput!) {\n bugEditComment(input: $input) {\n bug {\n id\n }\n }\n }\n"): (typeof documents)["\n mutation BugEditComment($input: BugEditCommentInput!) {\n bugEditComment(input: $input) {\n bug {\n id\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n mutation BugSetTitle($input: BugSetTitleInput!) {\n bugSetTitle(input: $input) {\n bug {\n id\n title\n }\n }\n }\n"): (typeof documents)["\n mutation BugSetTitle($input: BugSetTitleInput!) {\n bugSetTitle(input: $input) {\n bug {\n id\n title\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query CommitList($repo: String, $ref: String!, $path: String, $after: String, $first: Int) {\n repository(ref: $repo) {\n commits(ref: $ref, path: $path, after: $after, first: $first) {\n nodes {\n hash\n shortHash\n message\n authorName\n date\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n"): (typeof documents)["\n query CommitList($repo: String, $ref: String!, $path: String, $after: String, $first: Int) {\n repository(ref: $repo) {\n commits(ref: $ref, path: $path, after: $after, first: $first) {\n nodes {\n hash\n shortHash\n message\n authorName\n date\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query FileDiff($repo: String, $hash: String!, $path: String!) {\n repository(ref: $repo) {\n commit(hash: $hash) {\n diff(path: $path) {\n path\n oldPath\n isBinary\n isNew\n isDelete\n hunks {\n oldStart\n oldLines\n newStart\n newLines\n lines {\n type\n content\n oldLine\n newLine\n }\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query FileDiff($repo: String, $hash: String!, $path: String!) {\n repository(ref: $repo) {\n commit(hash: $hash) {\n diff(path: $path) {\n path\n oldPath\n isBinary\n isNew\n isDelete\n hunks {\n oldStart\n oldLines\n newStart\n newLines\n lines {\n type\n content\n oldLine\n newLine\n }\n }\n }\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment IdentitySummary on Identity {\n id\n humanId\n displayName\n avatarUrl\n }\n"): (typeof documents)["\n fragment IdentitySummary on Identity {\n id\n humanId\n displayName\n avatarUrl\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment BugSummary on Bug {\n id\n humanId\n status\n title\n labels {\n ...LabelFields\n }\n author {\n ...IdentitySummary\n }\n createdAt\n comments {\n totalCount\n }\n }\n"): (typeof documents)["\n fragment BugSummary on Bug {\n id\n humanId\n status\n title\n labels {\n ...LabelFields\n }\n author {\n ...IdentitySummary\n }\n createdAt\n comments {\n totalCount\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment LabelFields on Label {\n name\n color {\n R\n G\n B\n }\n }\n"): (typeof documents)["\n fragment LabelFields on Label {\n name\n color {\n R\n G\n B\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query UserIdentity {\n repository {\n userIdentity {\n id\n humanId\n name\n displayName\n avatarUrl\n email\n login\n }\n }\n }\n"): (typeof documents)["\n query UserIdentity {\n repository {\n userIdentity {\n id\n humanId\n name\n displayName\n avatarUrl\n email\n login\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query CodePageRefs($repo: String) {\n repository(ref: $repo) {\n name\n head {\n shortName\n }\n refs {\n nodes {\n name\n shortName\n type\n hash\n }\n }\n }\n }\n"): (typeof documents)["\n query CodePageRefs($repo: String) {\n repository(ref: $repo) {\n name\n head {\n shortName\n }\n refs {\n nodes {\n name\n shortName\n type\n hash\n }\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query CodePageBlob($repo: String, $ref: String!, $path: String!) {\n repository(ref: $repo) {\n blob(ref: $ref, path: $path) {\n path\n hash\n text\n size\n isBinary\n isTruncated\n }\n }\n }\n"): (typeof documents)["\n query CodePageBlob($repo: String, $ref: String!, $path: String!) {\n repository(ref: $repo) {\n blob(ref: $ref, path: $path) {\n path\n hash\n text\n size\n isBinary\n isTruncated\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query CodePageTree($repo: String, $ref: String!, $path: String) {\n repository(ref: $repo) {\n tree(ref: $ref, path: $path) {\n name\n type\n hash\n }\n }\n }\n"): (typeof documents)["\n query CodePageTree($repo: String, $ref: String!, $path: String) {\n repository(ref: $repo) {\n tree(ref: $ref, path: $path) {\n name\n type\n hash\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query CodePageLastCommits(\n $repo: String\n $ref: String!\n $path: String\n $names: [String!]!\n ) {\n repository(ref: $repo) {\n lastCommits(ref: $ref, path: $path, names: $names) {\n name\n commit {\n hash\n shortHash\n message\n date\n }\n }\n }\n }\n"): (typeof documents)["\n query CodePageLastCommits(\n $repo: String\n $ref: String!\n $path: String\n $names: [String!]!\n ) {\n repository(ref: $repo) {\n lastCommits(ref: $ref, path: $path, names: $names) {\n name\n commit {\n hash\n shortHash\n message\n date\n }\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query CodePageReadme($repo: String, $ref: String!, $path: String!) {\n repository(ref: $repo) {\n blob(ref: $ref, path: $path) {\n text\n }\n }\n }\n"): (typeof documents)["\n query CodePageReadme($repo: String, $ref: String!, $path: String!) {\n repository(ref: $repo) {\n blob(ref: $ref, path: $path) {\n text\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query AllIdentities($ref: String) {\n repository(ref: $ref) {\n allIdentities(first: 1000) {\n nodes {\n id\n humanId\n name\n email\n login\n displayName\n avatarUrl\n }\n }\n }\n }\n"): (typeof documents)["\n query AllIdentities($ref: String) {\n repository(ref: $ref) {\n allIdentities(first: 1000) {\n nodes {\n id\n humanId\n name\n email\n login\n displayName\n avatarUrl\n }\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query ValidLabels($ref: String) {\n repository(ref: $ref) {\n validLabels {\n nodes {\n name\n color {\n R\n G\n B\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query ValidLabels($ref: String) {\n repository(ref: $ref) {\n validLabels {\n nodes {\n name\n color {\n R\n G\n B\n }\n }\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query BugDetail($ref: String, $prefix: String!) {\n repository(ref: $ref) {\n bug(prefix: $prefix) {\n ...BugSummary\n lastEdit\n participants(first: 20) {\n nodes {\n ...IdentitySummary\n }\n }\n timeline(first: 250) {\n nodes {\n __typename\n id\n ... on BugCreateTimelineItem {\n ...BugCreateCommentFields\n }\n ... on BugAddCommentTimelineItem {\n ...BugAddCommentFields\n }\n ... on BugLabelChangeTimelineItem {\n ...LabelChangeFields\n }\n ... on BugSetStatusTimelineItem {\n ...StatusChangeFields\n }\n ... on BugSetTitleTimelineItem {\n ...TitleChangeFields\n }\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query BugDetail($ref: String, $prefix: String!) {\n repository(ref: $ref) {\n bug(prefix: $prefix) {\n ...BugSummary\n lastEdit\n participants(first: 20) {\n nodes {\n ...IdentitySummary\n }\n }\n timeline(first: 250) {\n nodes {\n __typename\n id\n ... on BugCreateTimelineItem {\n ...BugCreateCommentFields\n }\n ... on BugAddCommentTimelineItem {\n ...BugAddCommentFields\n }\n ... on BugLabelChangeTimelineItem {\n ...LabelChangeFields\n }\n ... on BugSetStatusTimelineItem {\n ...StatusChangeFields\n }\n ... on BugSetTitleTimelineItem {\n ...TitleChangeFields\n }\n }\n }\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query BugList(\n $ref: String\n $openQuery: String!\n $closedQuery: String!\n $listQuery: String!\n $first: Int\n $after: String\n ) {\n repository(ref: $ref) {\n openCount: allBugs(query: $openQuery, first: 1) {\n totalCount\n }\n closedCount: allBugs(query: $closedQuery, first: 1) {\n totalCount\n }\n bugs: allBugs(query: $listQuery, first: $first, after: $after) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...BugSummary\n }\n }\n }\n }\n"): (typeof documents)["\n query BugList(\n $ref: String\n $openQuery: String!\n $closedQuery: String!\n $listQuery: String!\n $first: Int\n $after: String\n ) {\n repository(ref: $ref) {\n openCount: allBugs(query: $openQuery, first: 1) {\n totalCount\n }\n closedCount: allBugs(query: $closedQuery, first: 1) {\n totalCount\n }\n bugs: allBugs(query: $listQuery, first: $first, after: $after) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...BugSummary\n }\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n mutation BugCreate($input: BugCreateInput!) {\n bugCreate(input: $input) {\n bug {\n id\n humanId\n }\n }\n }\n"): (typeof documents)["\n mutation BugCreate($input: BugCreateInput!) {\n bugCreate(input: $input) {\n bug {\n id\n humanId\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query UserProfile(\n $ref: String\n $prefix: String!\n $openQuery: String!\n $closedQuery: String!\n $listQuery: String!\n $after: String\n ) {\n repository(ref: $ref) {\n identity(prefix: $prefix) {\n id\n humanId\n name\n email\n login\n displayName\n avatarUrl\n isProtected\n }\n openCount: allBugs(query: $openQuery, first: 1) {\n totalCount\n }\n closedCount: allBugs(query: $closedQuery, first: 1) {\n totalCount\n }\n bugs: allBugs(query: $listQuery, first: 25, after: $after) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...BugSummary\n }\n }\n }\n }\n"): (typeof documents)["\n query UserProfile(\n $ref: String\n $prefix: String!\n $openQuery: String!\n $closedQuery: String!\n $listQuery: String!\n $after: String\n ) {\n repository(ref: $ref) {\n identity(prefix: $prefix) {\n id\n humanId\n name\n email\n login\n displayName\n avatarUrl\n isProtected\n }\n openCount: allBugs(query: $openQuery, first: 1) {\n totalCount\n }\n closedCount: allBugs(query: $closedQuery, first: 1) {\n totalCount\n }\n bugs: allBugs(query: $listQuery, first: 25, after: $after) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...BugSummary\n }\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query CommitPageDetail($repo: String, $hash: String!) {\n repository(ref: $repo) {\n commit(hash: $hash) {\n hash\n shortHash\n message\n fullMessage\n authorName\n authorEmail\n date\n parents\n files {\n nodes {\n path\n oldPath\n status\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query CommitPageDetail($repo: String, $hash: String!) {\n repository(ref: $repo) {\n commit(hash: $hash) {\n hash\n shortHash\n message\n fullMessage\n authorName\n authorEmail\n date\n parents\n files {\n nodes {\n path\n oldPath\n status\n }\n }\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query Repositories {\n repositories {\n nodes {\n name\n }\n totalCount\n }\n }\n"): (typeof documents)["\n query Repositories {\n repositories {\n nodes {\n name\n }\n totalCount\n }\n }\n"]; + +export function graphql(source: string) { + return (documents as any)[source] ?? {}; +} + +export type DocumentType> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never; \ No newline at end of file diff --git a/webui2/src/__generated__/graphql.ts b/webui2/src/__generated__/graphql.ts index 43a0ff6313e99c5a8f14bf4b398e9a3432dcac27..687ed5f8cd32383a11d287910bd89084a4ff418d 100644 --- a/webui2/src/__generated__/graphql.ts +++ b/webui2/src/__generated__/graphql.ts @@ -1,14 +1,12 @@ -import { gql } from '@apollo/client'; -import * as Apollo from '@apollo/client'; -import * as ApolloReactHooks from '@apollo/client/react'; +/* eslint-disable */ +import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; export type Maybe = T | null; -export type InputMaybe = Maybe; +export type InputMaybe = T | null | undefined; export type Exact = { [K in keyof T]: T[K] }; export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; export type MakeEmpty = { [_ in K]?: never }; export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; -const defaultOptions = {} as const; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: { input: string; output: string; } @@ -28,7 +26,7 @@ export type Authored = { }; export type Bug = Authored & Entity & { - __typename?: 'Bug'; + __typename: 'Bug'; /** The actors of the bug. Actors are Identity that have interacted with the bug. */ actors: IdentityConnection; author: Identity; @@ -105,11 +103,11 @@ export type BugAddCommentAndCloseInput = { }; export type BugAddCommentAndClosePayload = { - __typename?: 'BugAddCommentAndClosePayload'; + __typename: 'BugAddCommentAndClosePayload'; /** The affected bug. */ bug: Bug; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId: Maybe; /** The resulting AddComment operation. */ commentOperation: BugAddCommentOperation; /** The resulting SetStatusOperation. */ @@ -130,11 +128,11 @@ export type BugAddCommentAndReopenInput = { }; export type BugAddCommentAndReopenPayload = { - __typename?: 'BugAddCommentAndReopenPayload'; + __typename: 'BugAddCommentAndReopenPayload'; /** The affected bug. */ bug: Bug; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId: Maybe; /** The resulting AddComment operation. */ commentOperation: BugAddCommentOperation; /** The resulting SetStatusOperation. */ @@ -155,7 +153,7 @@ export type BugAddCommentInput = { }; export type BugAddCommentOperation = Authored & Operation & { - __typename?: 'BugAddCommentOperation'; + __typename: 'BugAddCommentOperation'; /** The author of this object. */ author: Identity; /** The datetime when this operation was issued. */ @@ -167,18 +165,18 @@ export type BugAddCommentOperation = Authored & Operation & { }; export type BugAddCommentPayload = { - __typename?: 'BugAddCommentPayload'; + __typename: 'BugAddCommentPayload'; /** The affected bug. */ bug: Bug; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId: Maybe; /** The resulting operation. */ operation: BugAddCommentOperation; }; /** BugAddCommentTimelineItem is a BugTimelineItem that represent a BugComment and its edition history */ export type BugAddCommentTimelineItem = Authored & BugTimelineItem & { - __typename?: 'BugAddCommentTimelineItem'; + __typename: 'BugAddCommentTimelineItem'; author: Identity; createdAt: Scalars['Time']['output']; edited: Scalars['Boolean']['output']; @@ -205,11 +203,11 @@ export type BugChangeLabelInput = { }; export type BugChangeLabelPayload = { - __typename?: 'BugChangeLabelPayload'; + __typename: 'BugChangeLabelPayload'; /** The affected bug. */ bug: Bug; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId: Maybe; /** The resulting operation. */ operation: BugLabelChangeOperation; /** The effect each source label had. */ @@ -218,7 +216,7 @@ export type BugChangeLabelPayload = { /** Represents a comment on a bug. */ export type BugComment = Authored & { - __typename?: 'BugComment'; + __typename: 'BugComment'; /** The author of this comment. */ author: Identity; /** All media's hash referenced in this comment */ @@ -229,7 +227,7 @@ export type BugComment = Authored & { }; export type BugCommentConnection = { - __typename?: 'BugCommentConnection'; + __typename: 'BugCommentConnection'; edges: Array; nodes: Array; pageInfo: PageInfo; @@ -237,21 +235,21 @@ export type BugCommentConnection = { }; export type BugCommentEdge = { - __typename?: 'BugCommentEdge'; + __typename: 'BugCommentEdge'; cursor: Scalars['String']['output']; node: BugComment; }; /** CommentHistoryStep hold one version of a message in the history */ export type BugCommentHistoryStep = { - __typename?: 'BugCommentHistoryStep'; + __typename: 'BugCommentHistoryStep'; date: Scalars['Time']['output']; message: Scalars['String']['output']; }; /** The connection type for Bug. */ export type BugConnection = { - __typename?: 'BugConnection'; + __typename: 'BugConnection'; /** A list of edges. */ edges: Array; nodes: Array; @@ -275,7 +273,7 @@ export type BugCreateInput = { }; export type BugCreateOperation = Authored & Operation & { - __typename?: 'BugCreateOperation'; + __typename: 'BugCreateOperation'; /** The author of this object. */ author: Identity; /** The datetime when this operation was issued. */ @@ -288,18 +286,18 @@ export type BugCreateOperation = Authored & Operation & { }; export type BugCreatePayload = { - __typename?: 'BugCreatePayload'; + __typename: 'BugCreatePayload'; /** The created bug. */ bug: Bug; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId: Maybe; /** The resulting operation. */ operation: BugCreateOperation; }; /** BugCreateTimelineItem is a BugTimelineItem that represent the creation of a bug and its message edition history */ export type BugCreateTimelineItem = Authored & BugTimelineItem & { - __typename?: 'BugCreateTimelineItem'; + __typename: 'BugCreateTimelineItem'; author: Identity; createdAt: Scalars['Time']['output']; edited: Scalars['Boolean']['output']; @@ -314,7 +312,7 @@ export type BugCreateTimelineItem = Authored & BugTimelineItem & { /** An edge in a connection. */ export type BugEdge = { - __typename?: 'BugEdge'; + __typename: 'BugEdge'; /** A cursor for use in pagination. */ cursor: Scalars['String']['output']; /** The item at the end of the edge. */ @@ -335,7 +333,7 @@ export type BugEditCommentInput = { }; export type BugEditCommentOperation = Authored & Operation & { - __typename?: 'BugEditCommentOperation'; + __typename: 'BugEditCommentOperation'; /** The author of this object. */ author: Identity; /** The datetime when this operation was issued. */ @@ -348,23 +346,23 @@ export type BugEditCommentOperation = Authored & Operation & { }; export type BugEditCommentPayload = { - __typename?: 'BugEditCommentPayload'; + __typename: 'BugEditCommentPayload'; /** The affected bug. */ bug: Bug; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId: Maybe; /** The resulting operation. */ operation: BugEditCommentOperation; }; export type BugEvent = { - __typename?: 'BugEvent'; + __typename: 'BugEvent'; bug: Bug; type: EntityEventType; }; export type BugLabelChangeOperation = Authored & Operation & { - __typename?: 'BugLabelChangeOperation'; + __typename: 'BugLabelChangeOperation'; added: Array