|
| 1 | +import { GraphQLResolveInfo } from 'graphql'; |
| 2 | +export type Maybe<T> = T | null; |
| 3 | +export type InputMaybe<T> = Maybe<T>; |
| 4 | +export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] }; |
| 5 | +export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> }; |
| 6 | +export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> }; |
| 7 | +export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never }; |
| 8 | +export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; |
| 9 | +/** All built-in and custom scalars, mapped to their actual values */ |
| 10 | +export type Scalars = { |
| 11 | + ID: { input: string; output: string; } |
| 12 | + String: { input: string; output: string; } |
| 13 | + Boolean: { input: boolean; output: boolean; } |
| 14 | + Int: { input: number; output: number; } |
| 15 | + Float: { input: number; output: number; } |
| 16 | +}; |
| 17 | + |
| 18 | +export type Query = { |
| 19 | + __typename?: 'Query'; |
| 20 | + hello: Scalars['String']['output']; |
| 21 | +}; |
| 22 | + |
| 23 | +export type WithIndex<TObject> = TObject & Record<string, any>; |
| 24 | +export type ResolversObject<TObject> = WithIndex<TObject>; |
| 25 | + |
| 26 | +export type ResolverTypeWrapper<T> = Promise<T> | T; |
| 27 | + |
| 28 | + |
| 29 | +export type ResolverWithResolve<TResult, TParent, TContext, TArgs> = { |
| 30 | + resolve: ResolverFn<TResult, TParent, TContext, TArgs>; |
| 31 | +}; |
| 32 | +export type Resolver<TResult, TParent = {}, TContext = {}, TArgs = {}> = ResolverFn<TResult, TParent, TContext, TArgs> | ResolverWithResolve<TResult, TParent, TContext, TArgs>; |
| 33 | + |
| 34 | +export type ResolverFn<TResult, TParent, TContext, TArgs> = ( |
| 35 | + parent: TParent, |
| 36 | + args: TArgs, |
| 37 | + context: TContext, |
| 38 | + info: GraphQLResolveInfo |
| 39 | +) => Promise<TResult> | TResult; |
| 40 | + |
| 41 | +export type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = ( |
| 42 | + parent: TParent, |
| 43 | + args: TArgs, |
| 44 | + context: TContext, |
| 45 | + info: GraphQLResolveInfo |
| 46 | +) => AsyncIterable<TResult> | Promise<AsyncIterable<TResult>>; |
| 47 | + |
| 48 | +export type SubscriptionResolveFn<TResult, TParent, TContext, TArgs> = ( |
| 49 | + parent: TParent, |
| 50 | + args: TArgs, |
| 51 | + context: TContext, |
| 52 | + info: GraphQLResolveInfo |
| 53 | +) => TResult | Promise<TResult>; |
| 54 | + |
| 55 | +export interface SubscriptionSubscriberObject<TResult, TKey extends string, TParent, TContext, TArgs> { |
| 56 | + subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>; |
| 57 | + resolve?: SubscriptionResolveFn<TResult, { [key in TKey]: TResult }, TContext, TArgs>; |
| 58 | +} |
| 59 | + |
| 60 | +export interface SubscriptionResolverObject<TResult, TParent, TContext, TArgs> { |
| 61 | + subscribe: SubscriptionSubscribeFn<any, TParent, TContext, TArgs>; |
| 62 | + resolve: SubscriptionResolveFn<TResult, any, TContext, TArgs>; |
| 63 | +} |
| 64 | + |
| 65 | +export type SubscriptionObject<TResult, TKey extends string, TParent, TContext, TArgs> = |
| 66 | + | SubscriptionSubscriberObject<TResult, TKey, TParent, TContext, TArgs> |
| 67 | + | SubscriptionResolverObject<TResult, TParent, TContext, TArgs>; |
| 68 | + |
| 69 | +export type SubscriptionResolver<TResult, TKey extends string, TParent = {}, TContext = {}, TArgs = {}> = |
| 70 | + | ((...args: any[]) => SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>) |
| 71 | + | SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>; |
| 72 | + |
| 73 | +export type TypeResolveFn<TTypes, TParent = {}, TContext = {}> = ( |
| 74 | + parent: TParent, |
| 75 | + context: TContext, |
| 76 | + info: GraphQLResolveInfo |
| 77 | +) => Maybe<TTypes> | Promise<Maybe<TTypes>>; |
| 78 | + |
| 79 | +export type IsTypeOfResolverFn<T = {}, TContext = {}> = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise<boolean>; |
| 80 | + |
| 81 | +export type NextResolverFn<T> = () => Promise<T>; |
| 82 | + |
| 83 | +export type DirectiveResolverFn<TResult = {}, TParent = {}, TContext = {}, TArgs = {}> = ( |
| 84 | + next: NextResolverFn<TResult>, |
| 85 | + parent: TParent, |
| 86 | + args: TArgs, |
| 87 | + context: TContext, |
| 88 | + info: GraphQLResolveInfo |
| 89 | +) => TResult | Promise<TResult>; |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | +/** Mapping between all available schema types and the resolvers types */ |
| 94 | +export type ResolversTypes = ResolversObject<{ |
| 95 | + Boolean: ResolverTypeWrapper<Scalars['Boolean']['output']>; |
| 96 | + Query: ResolverTypeWrapper<{}>; |
| 97 | + String: ResolverTypeWrapper<Scalars['String']['output']>; |
| 98 | +}>; |
| 99 | + |
| 100 | +/** Mapping between all available schema types and the resolvers parents */ |
| 101 | +export type ResolversParentTypes = ResolversObject<{ |
| 102 | + Boolean: Scalars['Boolean']['output']; |
| 103 | + Query: {}; |
| 104 | + String: Scalars['String']['output']; |
| 105 | +}>; |
| 106 | + |
| 107 | +export type QueryResolvers<ContextType = any, ParentType extends ResolversParentTypes['Query'] = ResolversParentTypes['Query']> = ResolversObject<{ |
| 108 | + hello?: Resolver<ResolversTypes['String'], ParentType, ContextType>; |
| 109 | +}>; |
| 110 | + |
| 111 | +export type Resolvers<ContextType = any> = ResolversObject<{ |
| 112 | + Query?: QueryResolvers<ContextType>; |
| 113 | +}>; |
| 114 | + |
0 commit comments