Created
October 5, 2018 07:07
-
-
Save eljenso/5139abfbf4bed47c705120f5de46bedc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* tslint:disable */ | |
import { GraphQLResolveInfo } from "graphql"; | |
export type Resolver<Result, Parent = any, Context = any, Args = any> = ( | |
parent: Parent, | |
args: Args, | |
context: Context, | |
info: GraphQLResolveInfo, | |
) => Promise<Result> | Result; | |
export type SubscriptionResolver< | |
Result, | |
Parent = any, | |
Context = any, | |
Args = any | |
> = { | |
subscribe<R = Result, P = Parent>( | |
parent: P, | |
args: Args, | |
context: Context, | |
info: GraphQLResolveInfo, | |
): AsyncIterator<R | Result>; | |
resolve?<R = Result, P = Parent>( | |
parent: P, | |
args: Args, | |
context: Context, | |
info: GraphQLResolveInfo, | |
): R | Result | Promise<R | Result>; | |
}; | |
/** The `Upload` scalar type represents a file upload promise that resolves an object containing `stream`, `filename`, `mimetype` and `encoding`. */ | |
export type Upload = any; | |
export interface IElement { | |
id: string; | |
name: string; | |
parent?: IElement | null; | |
children?: IElement[] | null; | |
} | |
export interface Query { | |
element?: IElement | null; | |
elements?: (IElement | null)[] | null; | |
} | |
export interface Section extends IElement { | |
id: string; | |
name: string; | |
children?: IElement[] | null; | |
parent?: IElement | null; | |
} | |
export interface ElementQueryArgs { | |
id: string; | |
} | |
export interface ChildrenSectionArgs { | |
id?: string | null; | |
} | |
export enum CacheControlScope { | |
PUBLIC = "PUBLIC", | |
PRIVATE = "PRIVATE", | |
} | |
export namespace QueryResolvers { | |
export interface Resolvers<Context = any> { | |
element?: ElementResolver<IElement | null, any, Context>; | |
elements?: ElementsResolver<(IElement | null)[] | null, any, Context>; | |
} | |
export type ElementResolver< | |
R = IElement | null, | |
Parent = any, | |
Context = any | |
> = Resolver<R, Parent, Context, ElementArgs>; | |
export interface ElementArgs { | |
id: string; | |
} | |
export type ElementsResolver< | |
R = (IElement | null)[] | null, | |
Parent = any, | |
Context = any | |
> = Resolver<R, Parent, Context>; | |
} | |
export namespace SectionResolvers { | |
export interface Resolvers<Context = any> { | |
id?: IdResolver<string, any, Context>; | |
name?: NameResolver<string, any, Context>; | |
children?: ChildrenResolver<IElement[] | null, any, Context>; | |
parent?: ParentResolver<IElement | null, any, Context>; | |
} | |
export type IdResolver<R = string, Parent = any, Context = any> = Resolver< | |
R, | |
Parent, | |
Context | |
>; | |
export type NameResolver<R = string, Parent = any, Context = any> = Resolver< | |
R, | |
Parent, | |
Context | |
>; | |
export type ChildrenResolver< | |
R = IElement[] | null, | |
Parent = any, | |
Context = any | |
> = Resolver<R, Parent, Context, ChildrenArgs>; | |
export interface ChildrenArgs { | |
id?: string | null; | |
} | |
export type ParentResolver< | |
R = IElement | null, | |
Parent = any, | |
Context = any | |
> = Resolver<R, Parent, Context>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment