import { GraphQLResolveInfo, GraphQLScalarType } from 'graphql'; /** * This file is auto-generated by @pongsatt/graphql-schema-typescript * Please note that any changes in this file may be overwritten */ /******************************* * * * TYPE DEFS * * * *******************************/ export interface GQLQuery { products: GQLProduct[]; product?: GQLProduct; } export interface GQLProduct { id: string; name: string; text?: string; createdAt?: GQLDate; updatedAt?: GQLDate; } export type GQLDate = any; export interface GQLMutation { addProduct: GQLProduct; } /********************************* * * * TYPE RESOLVERS * * * *********************************/ /** * This interface define the shape of your resolver * Note that this type is designed to be compatible with graphql-tools resolvers * However, you can still use other generated interfaces to make your resolver type-safed */ export interface GQLResolver { Query?: GQLQueryTypeResolver; Product?: GQLProductTypeResolver; Date?: GraphQLScalarType; Mutation?: GQLMutationTypeResolver; } export interface GQLQueryTypeResolver { products?: QueryToProductsResolver; product?: QueryToProductResolver; } export interface QueryToProductsResolver|Promise>> { (parent: TParent, args: {}, context: any, info: GraphQLResolveInfo): TResult; } export interface QueryToProductArgs { id: string; } export interface QueryToProductResolver> { (parent: TParent, args: QueryToProductArgs, context: any, info: GraphQLResolveInfo): TResult; } export interface GQLProductTypeResolver { id?: ProductToIdResolver; name?: ProductToNameResolver; text?: ProductToTextResolver; createdAt?: ProductToCreatedAtResolver; updatedAt?: ProductToUpdatedAtResolver; } export interface ProductToIdResolver> { (parent: TParent, args: {}, context: any, info: GraphQLResolveInfo): TResult; } export interface ProductToNameResolver> { (parent: TParent, args: {}, context: any, info: GraphQLResolveInfo): TResult; } export interface ProductToTextResolver> { (parent: TParent, args: {}, context: any, info: GraphQLResolveInfo): TResult; } export interface ProductToCreatedAtResolver> { (parent: TParent, args: {}, context: any, info: GraphQLResolveInfo): TResult; } export interface ProductToUpdatedAtResolver> { (parent: TParent, args: {}, context: any, info: GraphQLResolveInfo): TResult; } export interface GQLMutationTypeResolver { addProduct?: MutationToAddProductResolver; } export interface MutationToAddProductArgs { name: string; text?: string; } export interface MutationToAddProductResolver> { (parent: TParent, args: MutationToAddProductArgs, context: any, info: GraphQLResolveInfo): TResult; }