UNPKG

graphql-request

Version:

Minimal GraphQL client supporting Node and browsers for scripts or simple apps.

19 lines 1.51 kB
import type { RootTypeName } from '../../lib/graphql.js'; import type { Exact } from '../../lib/prelude.js'; import type { Schema } from '../1_Schema/__.js'; import type { GlobalRegistry } from '../2_generator/globalRegistry.js'; import type { SelectionSet } from '../3_SelectionSet/__.js'; type TypeSelectionSets<$Index extends Schema.Index> = { [$RootTypeName in RootTypeName as $RootTypeName extends keyof $Index['Root'] ? $Index['Root'][$RootTypeName] extends null ? never : $RootTypeName : never]: <$SelectionSet extends object>(selectionSet: Exact<$SelectionSet, SelectionSet.Root<$Index, $RootTypeName>>) => $SelectionSet; } & { [$Name in keyof $Index['objects']]: <$SelectionSet extends object>(selectionSet: Exact<$SelectionSet, SelectionSet.Object<$Index['objects'][$Name], $Index>>) => $SelectionSet; } & { [$Name in keyof $Index['unions']]: <$SelectionSet extends object>(selectionSet: Exact<$SelectionSet, SelectionSet.Union<$Index['unions'][$Name], $Index>>) => $SelectionSet; } & { [$Name in keyof Schema.Index['interfaces']]: <$SelectionSet extends object>(selectionSet: Exact<$SelectionSet, SelectionSet.Interface<$Index['interfaces'][$Name], $Index>>) => $SelectionSet; }; type Create = <$Name extends GlobalRegistry.SchemaNames>(name: $Name) => TypeSelectionSets<GlobalRegistry.GetSchemaIndexOrDefault<$Name>>; export declare const create: Create; export declare const select: TypeSelectionSets<GlobalRegistry.SchemaIndexDefault>; export {}; //# sourceMappingURL=select.d.ts.map