Files
supabase/apps/studio/data/graphql/gql.ts
Ivan Vasilov 56d40fe0b2 chore: Migrate eslint for all apps to use flat config (#39486)
* Use the "eslint" command instead of built-in next lint since it's getting obsolete.

* Bump all deps to support eslint 9+.

* Convert the rules in eslint-config-supabase to be flat-config compatible.

* Migrate all apps to use the new eslint config rules.

* Fix all errors found in the new setup.

* Fix the no default exports ignores.

* Scan all files for linting in studio.

* Fix all lint errors.

* Make the reportUnusedDisableDirectives a warning.
2025-10-15 16:35:24 +02:00

32 lines
1.6 KiB
TypeScript

import * as types from './graphql'
/**
* 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 query ErrorCodeQuery($code: String!, $service: Service) {\n errors(code: $code, service: $service) {\n nodes {\n code\n service\n message\n }\n }\n }\n': typeof types.ErrorCodeQueryDocument
}
const documents: Documents = {
'\n query ErrorCodeQuery($code: String!, $service: Service) {\n errors(code: $code, service: $service) {\n nodes {\n code\n service\n message\n }\n }\n }\n':
types.ErrorCodeQueryDocument,
}
/**
* 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 ErrorCodeQuery($code: String!, $service: Service) {\n errors(code: $code, service: $service) {\n nodes {\n code\n service\n message\n }\n }\n }\n'
): typeof import('./graphql').ErrorCodeQueryDocument
export function graphql(source: string) {
return (documents as any)[source] ?? {}
}