import type { FieldOptions , DirectiveArgs } from 'graphql-ts-client-api' ; import { ObjectFetcher , createFetcher , createFetchableType } from 'graphql-ts-client-api' ; import type { WithTypeName , ImplementationType } from '../CommonTypes' ; import { node$ } from './NodeFetcher' ; import { Gender } from '../enums' ; export interface EmployeeFetcher < T extends object , TVariables extends object > extends ObjectFetcher < 'Employee' , T , TVariables > { on < XName extends ImplementationType < 'Employee' > , X extends object , XVariables extends object > ( child , fragmentName ? ) : EmployeeFetcher < XName extends 'Employee' ? T & X : WithTypeName < T , ImplementationType < 'Employee' > > & ( WithTypeName < X , ImplementationType < XName > > | { __typename : Exclude < ImplementationType < 'Employee' > , ImplementationType < XName > > ; } ) , TVariables & XVariables > ; directive ( name , args ? ) : EmployeeFetcher < T , TVariables > ; readonly __typename : EmployeeFetcher < T & { __typename : ImplementationType < 'Employee' > ; } , TVariables > ; readonly id : EmployeeFetcher < T & { readonly "id" : string ; } , TVariables > ; "id+" < XAlias extends string = "id" , XDirectives extends { readonly [ key ] : DirectiveArgs ; } = { } , XDirectiveVariables extends object = { } > ( optionsConfigurer ) : EmployeeFetcher < T & ( XDirectives extends { readonly include : any ; } | { readonly skip : any ; } ? { readonly [ key in XAlias ] ? : string ; } : { readonly [ key in XAlias ] : string ; } ) , TVariables & XDirectiveVariables > ; readonly "~id" : EmployeeFetcher < Omit < T , 'id' > , TVariables > ; readonly firstName : EmployeeFetcher < T & { readonly "firstName" : string ; } , TVariables > ; "firstName+" < XAlias extends string = "firstName" , XDirectives extends { readonly [ key ] : DirectiveArgs ; } = { } , XDirectiveVariables extends object = { } > ( optionsConfigurer ) : EmployeeFetcher < T & ( XDirectives extends { readonly include : any ; } | { readonly skip : any ; } ? { readonly [ key in XAlias ] ? : string ; } : { readonly [ key in XAlias ] : string ; } ) , TVariables & XDirectiveVariables > ; readonly "~firstName" : EmployeeFetcher < Omit < T , 'firstName' > , TVariables > ; readonly lastName : EmployeeFetcher < T & { readonly "lastName" : string ; } , TVariables > ; "lastName+" < XAlias extends string = "lastName" , XDirectives extends { readonly [ key ] : DirectiveArgs ; } = { } , XDirectiveVariables extends object = { } > ( optionsConfigurer ) : EmployeeFetcher < T & ( XDirectives extends { readonly include : any ; } | { readonly skip : any ; } ? { readonly [ key in XAlias ] ? : string ; } : { readonly [ key in XAlias ] : string ; } ) , TVariables & XDirectiveVariables > ; readonly "~lastName" : EmployeeFetcher < Omit < T , 'lastName' > , TVariables > ; readonly gender : EmployeeFetcher < T & { readonly "gender" : Gender ; } , TVariables > ; "gender+" < XAlias extends string = "gender" , XDirectives extends { readonly [ key ] : DirectiveArgs ; } = { } , XDirectiveVariables extends object = { } > ( optionsConfigurer ) : EmployeeFetcher < T & ( XDirectives extends { readonly include : any ; } | { readonly skip : any ; } ? { readonly [ key in XAlias ] ? : Gender ; } : { readonly [ key in XAlias ] : Gender ; } ) , TVariables & XDirectiveVariables > ; readonly "~gender" : EmployeeFetcher < Omit < T , 'gender' > , TVariables > ; readonly salary : EmployeeFetcher < T & { readonly "salary" : number ; } , TVariables > ; "salary+" < XAlias extends string = "salary" , XDirectives extends { readonly [ key ] : DirectiveArgs ; } = { } , XDirectiveVariables extends object = { } > ( optionsConfigurer ) : EmployeeFetcher < T & ( XDirectives extends { readonly include : any ; } | { readonly skip : any ; } ? { readonly [ key in XAlias ] ? : number ; } : { readonly [ key in XAlias ] : number ; } ) , TVariables & XDirectiveVariables > ; readonly "~salary" : EmployeeFetcher < Omit < T , 'salary' > , TVariables > ; department < X extends object , XVariables extends object > ( child ) : EmployeeFetcher < T & { readonly "department" : X ; } , TVariables & XVariables > ; department < X extends object , XVariables extends object , XAlias extends string = "department" , XDirectives extends { readonly [ key ] : DirectiveArgs ; } = { } , XDirectiveVariables extends object = { } > ( child , optionsConfigurer ) : EmployeeFetcher < T & ( XDirectives extends { readonly include : any ; } | { readonly skip : any ; } ? { readonly [ key in XAlias ] ? : X ; } : { readonly [ key in XAlias ] : X ; } ) , TVariables & XVariables & XDirectiveVariables > ; supervisor < X extends object , XVariables extends object > ( child ) : EmployeeFetcher < T & { readonly "supervisor" ? : X ; } , TVariables & XVariables > ; supervisor < X extends object , XVariables extends object , XAlias extends string = "supervisor" , XDirectiveVariables extends object = { } > ( child , optionsConfigurer ) : EmployeeFetcher < T & { readonly [ key in XAlias ] ? : X ; } , TVariables & XVariables & XDirectiveVariables > ; subordinates < X extends object , XVariables extends object > ( child ) : EmployeeFetcher < T & { readonly "subordinates" : readonly X [ ] ; } , TVariables & XVariables > ; subordinates < X extends object , XVariables extends object , XAlias extends string = "subordinates" , XDirectives extends { readonly [ key ] : DirectiveArgs ; } = { } , XDirectiveVariables extends object = { } > ( child , optionsConfigurer ) : EmployeeFetcher < T & ( XDirectives extends { readonly include : any ; } | { readonly skip : any ; } ? { readonly [ key in XAlias ] ? : readonly X [ ] ; } : { readonly [ key in XAlias ] : readonly X [ ] ; } ) , TVariables & XVariables & XDirectiveVariables > ; } export const employee$ = createFetcher ( createFetchableType ( "Employee" , "OBJECT" , [ node$ . fetchableType ] , [ "firstName" , "lastName" , "gender" , "salary" , { category : "REFERENCE" , name : "department" , targetTypeName : "Department" } , { category : "REFERENCE" , name : "supervisor" , targetTypeName : "Employee" , undefinable : true } , { category : "LIST" , name : "subordinates" , targetTypeName : "Employee" } ] ) , undefined ) ; export const employee$$ = employee$ . id . firstName . lastName . gender . salary ;