mirror of
https://github.com/beak-insights/felicity-lims.git
synced 2025-02-22 07:52:59 +08:00
24 lines
759 B
TypeScript
24 lines
759 B
TypeScript
|
/* eslint-disable */
|
||
|
import * as types from './graphql';
|
||
|
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
|
||
|
|
||
|
const documents = [];
|
||
|
/**
|
||
|
* 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;
|
||
|
|
||
|
export function graphql(source: string) {
|
||
|
return (documents as any)[source] ?? {};
|
||
|
}
|
||
|
|
||
|
export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;
|