import { GraphQLResolveInfo } from 'graphql';
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
export type RequireFields<T, K extends keyof T> = { [X in Exclude<keyof T, K>]?: T[X] } & { [P in K]-?: NonNullable<T[P]> };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
  ID: string;
  String: string;
  Boolean: boolean;
  Int: number;
  Float: number;
};

export type Block = {
  __typename?: 'Block';
  loc_area: Scalars['String'];
  loc_code: Scalars['String'];
  loc_desc: Scalars['String'];
};

export type DataService = {
  __typename?: 'DataService';
  className: Scalars['String'];
  data: Scalars['String'];
  filter: Scalars['String'];
  returnFormatType: Scalars['String'];
  returnSequenceNumber: Scalars['Float'];
  returnSequenceTotal: Scalars['Float'];
};

export type Phase = {
  __typename?: 'Phase';
  blocks: Array<Block>;
  db: Scalars['String'];
  pers_id: Scalars['String'];
  sec_code: Scalars['String'];
  sec_desc: Scalars['String'];
  sec_id: Scalars['String'];
  sec_name: Scalars['String'];
};

export type Query = {
  __typename?: 'Query';
  dataservice: DataService;
  site: Site;
  sites: Array<Site>;
};


export type QueryDataserviceArgs = {
  className: Scalars['String'];
  filter?: InputMaybe<Scalars['String']>;
  returnFormatType?: InputMaybe<Scalars['String']>;
};


export type QuerySiteArgs = {
  db: Scalars['String'];
};

export type Site = {
  __typename?: 'Site';
  db: Scalars['String'];
  name: Scalars['String'];
  phases: Array<Phase>;
};



export type ResolverTypeWrapper<T> = Promise<T> | T;


export type ResolverWithResolve<TResult, TParent, TContext, TArgs> = {
  resolve: ResolverFn<TResult, TParent, TContext, TArgs>;
};
export type Resolver<TResult, TParent = {}, TContext = {}, TArgs = {}> = ResolverFn<TResult, TParent, TContext, TArgs> | ResolverWithResolve<TResult, TParent, TContext, TArgs>;

export type ResolverFn<TResult, TParent, TContext, TArgs> = (
  parent: TParent,
  args: TArgs,
  context: TContext,
  info: GraphQLResolveInfo
) => Promise<TResult> | TResult;

export type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = (
  parent: TParent,
  args: TArgs,
  context: TContext,
  info: GraphQLResolveInfo
) => AsyncIterable<TResult> | Promise<AsyncIterable<TResult>>;

export type SubscriptionResolveFn<TResult, TParent, TContext, TArgs> = (
  parent: TParent,
  args: TArgs,
  context: TContext,
  info: GraphQLResolveInfo
) => TResult | Promise<TResult>;

export interface SubscriptionSubscriberObject<TResult, TKey extends string, TParent, TContext, TArgs> {
  subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>;
  resolve?: SubscriptionResolveFn<TResult, { [key in TKey]: TResult }, TContext, TArgs>;
}

export interface SubscriptionResolverObject<TResult, TParent, TContext, TArgs> {
  subscribe: SubscriptionSubscribeFn<any, TParent, TContext, TArgs>;
  resolve: SubscriptionResolveFn<TResult, any, TContext, TArgs>;
}

export type SubscriptionObject<TResult, TKey extends string, TParent, TContext, TArgs> =
  | SubscriptionSubscriberObject<TResult, TKey, TParent, TContext, TArgs>
  | SubscriptionResolverObject<TResult, TParent, TContext, TArgs>;

export type SubscriptionResolver<TResult, TKey extends string, TParent = {}, TContext = {}, TArgs = {}> =
  | ((...args: any[]) => SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>)
  | SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>;

export type TypeResolveFn<TTypes, TParent = {}, TContext = {}> = (
  parent: TParent,
  context: TContext,
  info: GraphQLResolveInfo
) => Maybe<TTypes> | Promise<Maybe<TTypes>>;

export type IsTypeOfResolverFn<T = {}, TContext = {}> = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise<boolean>;

export type NextResolverFn<T> = () => Promise<T>;

export type DirectiveResolverFn<TResult = {}, TParent = {}, TContext = {}, TArgs = {}> = (
  next: NextResolverFn<TResult>,
  parent: TParent,
  args: TArgs,
  context: TContext,
  info: GraphQLResolveInfo
) => TResult | Promise<TResult>;

/** Mapping between all available schema types and the resolvers types */
export type ResolversTypes = {
  Block: ResolverTypeWrapper<Block>;
  Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
  DataService: ResolverTypeWrapper<DataService>;
  Float: ResolverTypeWrapper<Scalars['Float']>;
  Phase: ResolverTypeWrapper<Phase>;
  Query: ResolverTypeWrapper<{}>;
  Site: ResolverTypeWrapper<Site>;
  String: ResolverTypeWrapper<Scalars['String']>;
};

/** Mapping between all available schema types and the resolvers parents */
export type ResolversParentTypes = {
  Block: Block;
  Boolean: Scalars['Boolean'];
  DataService: DataService;
  Float: Scalars['Float'];
  Phase: Phase;
  Query: {};
  Site: Site;
  String: Scalars['String'];
};

export type BlockResolvers<ContextType = any, ParentType extends ResolversParentTypes['Block'] = ResolversParentTypes['Block']> = {
  loc_area?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
  loc_code?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
  loc_desc?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};

export type DataServiceResolvers<ContextType = any, ParentType extends ResolversParentTypes['DataService'] = ResolversParentTypes['DataService']> = {
  className?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
  data?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
  filter?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
  returnFormatType?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
  returnSequenceNumber?: Resolver<ResolversTypes['Float'], ParentType, ContextType>;
  returnSequenceTotal?: Resolver<ResolversTypes['Float'], ParentType, ContextType>;
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};

export type PhaseResolvers<ContextType = any, ParentType extends ResolversParentTypes['Phase'] = ResolversParentTypes['Phase']> = {
  blocks?: Resolver<Array<ResolversTypes['Block']>, ParentType, ContextType>;
  db?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
  pers_id?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
  sec_code?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
  sec_desc?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
  sec_id?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
  sec_name?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};

export type QueryResolvers<ContextType = any, ParentType extends ResolversParentTypes['Query'] = ResolversParentTypes['Query']> = {
  dataservice?: Resolver<ResolversTypes['DataService'], ParentType, ContextType, RequireFields<QueryDataserviceArgs, 'className'>>;
  site?: Resolver<ResolversTypes['Site'], ParentType, ContextType, RequireFields<QuerySiteArgs, 'db'>>;
  sites?: Resolver<Array<ResolversTypes['Site']>, ParentType, ContextType>;
};

export type SiteResolvers<ContextType = any, ParentType extends ResolversParentTypes['Site'] = ResolversParentTypes['Site']> = {
  db?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
  name?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
  phases?: Resolver<Array<ResolversTypes['Phase']>, ParentType, ContextType>;
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};

export type Resolvers<ContextType = any> = {
  Block?: BlockResolvers<ContextType>;
  DataService?: DataServiceResolvers<ContextType>;
  Phase?: PhaseResolvers<ContextType>;
  Query?: QueryResolvers<ContextType>;
  Site?: SiteResolvers<ContextType>;
};

