@kamilkisiela/graphql-tools

  • Version 4.0.6
  • Published
  • 422 kB
  • 5 dependencies
  • MIT license

Install

npm i @kamilkisiela/graphql-tools
yarn add @kamilkisiela/graphql-tools
pnpm add @kamilkisiela/graphql-tools

Overview

Useful tools to create and manipulate GraphQL schemas.

Index

Variables

Functions

Classes

Interfaces

Type Aliases

Variables

variable attachConnectorsToContext

const attachConnectorsToContext: Function;

    variable defaultMergedResolver

    const defaultMergedResolver: GraphQLFieldResolver<any, any>;

      Functions

      function addCatchUndefinedToSchema

      addCatchUndefinedToSchema: (schema: GraphQLSchema) => void;

        function addErrorLoggingToSchema

        addErrorLoggingToSchema: (schema: GraphQLSchema, logger: ILogger) => void;

          function addMockFunctionsToSchema

          addMockFunctionsToSchema: ({
          schema,
          mocks,
          preserveResolvers,
          }: IMockOptions) => void;

            function addResolveFunctionsToSchema

            addResolveFunctionsToSchema: (
            options: IAddResolveFunctionsToSchemaOptions | GraphQLSchema,
            legacyInputResolvers?: IResolvers,
            legacyInputValidationOptions?: IResolverValidationOptions
            ) => GraphQLSchema;

              function addSchemaLevelResolveFunction

              addSchemaLevelResolveFunction: (
              schema: GraphQLSchema,
              fn: GraphQLFieldResolver<any, any>
              ) => void;

                function assertResolveFunctionsPresent

                assertResolveFunctionsPresent: (
                schema: GraphQLSchema,
                resolverValidationOptions?: IResolverValidationOptions
                ) => void;

                  function attachDirectiveResolvers

                  attachDirectiveResolvers: (
                  schema: GraphQLSchema,
                  directiveResolvers: IDirectiveResolvers<any, any>
                  ) => void;

                    function buildSchemaFromTypeDefinitions

                    buildSchemaFromTypeDefinitions: (
                    typeDefinitions: ITypeDefinitions,
                    parseOptions?: GraphQLParseOptions
                    ) => GraphQLSchema;

                      function chainResolvers

                      chainResolvers: (
                      resolvers: GraphQLFieldResolver<any, any>[]
                      ) => (
                      root: any,
                      args: { [argName: string]: any },
                      ctx: any,
                      info: GraphQLResolveInfo
                      ) => any;

                        function checkForResolveTypeResolver

                        checkForResolveTypeResolver: (
                        schema: GraphQLSchema,
                        requireResolversForResolveType?: boolean
                        ) => void;

                          function concatenateTypeDefs

                          concatenateTypeDefs: (
                          typeDefinitionsAry: ITypedef[],
                          calledFunctionRefs?: any
                          ) => string;

                            function decorateWithLogger

                            decorateWithLogger: (
                            fn: GraphQLFieldResolver<any, any> | undefined,
                            logger: ILogger,
                            hint: string
                            ) => GraphQLFieldResolver<any, any>;

                              function defaultCreateRemoteResolver

                              defaultCreateRemoteResolver: (
                              fetcher: Fetcher
                              ) => GraphQLFieldResolver<any, any>;

                                function delegateToSchema

                                delegateToSchema: (
                                options: IDelegateToSchemaOptions | GraphQLSchema,
                                ...args: any[]
                                ) => Promise<any>;

                                  function extendResolversFromInterfaces

                                  extendResolversFromInterfaces: (
                                  schema: GraphQLSchema,
                                  resolvers: IResolvers
                                  ) => IResolvers<any, any>;

                                    function extractExtensionDefinitions

                                    extractExtensionDefinitions: (
                                    ast: DocumentNode
                                    ) => DocumentNode & { definitions: DefinitionNode[] };

                                      function forEachField

                                      forEachField: (schema: GraphQLSchema, fn: IFieldIteratorFn) => void;

                                        function introspectSchema

                                        introspectSchema: (
                                        fetcher: ApolloLink | Fetcher,
                                        linkContext?: { [key: string]: any }
                                        ) => Promise<GraphQLSchema>;

                                          function makeExecutableSchema

                                          makeExecutableSchema: <TContext = any>({
                                          typeDefs,
                                          resolvers,
                                          connectors,
                                          logger,
                                          allowUndefinedInResolve,
                                          resolverValidationOptions,
                                          directiveResolvers,
                                          schemaDirectives,
                                          parseOptions,
                                          inheritResolversFromInterfaces,
                                          }: IExecutableSchemaDefinition<TContext>) => GraphQLSchema;

                                            function makeRemoteExecutableSchema

                                            makeRemoteExecutableSchema: ({
                                            schema,
                                            link,
                                            fetcher,
                                            createResolver: customCreateResolver,
                                            buildSchemaOptions,
                                            printSchemaOptions,
                                            }: {
                                            schema: GraphQLSchema | string;
                                            link?: ApolloLink;
                                            fetcher?: Fetcher;
                                            createResolver?: (fetcher: Fetcher) => GraphQLFieldResolver<any, any>;
                                            buildSchemaOptions?: BuildSchemaOptions;
                                            printSchemaOptions?: PrintSchemaOptions;
                                            }) => GraphQLSchema;

                                              function mergeSchemas

                                              mergeSchemas: ({
                                              schemas,
                                              onTypeConflict,
                                              resolvers,
                                              schemaDirectives,
                                              inheritResolversFromInterfaces,
                                              mergeDirectives,
                                              }: {
                                              schemas: Array<string | GraphQLSchema | DocumentNode | Array<GraphQLNamedType>>;
                                              onTypeConflict?: OnTypeConflict;
                                              resolvers?: IResolversParameter;
                                              schemaDirectives?: { [name: string]: typeof SchemaDirectiveVisitor };
                                              inheritResolversFromInterfaces?: boolean;
                                              mergeDirectives?: boolean;
                                              }) => GraphQLSchema;

                                                function mockServer

                                                mockServer: (
                                                schema: GraphQLSchema | ITypeDefinitions,
                                                mocks: IMocks,
                                                preserveResolvers?: boolean
                                                ) => IMockServer;

                                                  function transformSchema

                                                  transformSchema: (
                                                  targetSchema: GraphQLSchema,
                                                  transforms: Array<Transform>
                                                  ) => GraphQLSchema & { transforms: Array<Transform> };

                                                    Classes

                                                    class AddArgumentsAsVariables

                                                    class AddArgumentsAsVariablesTransform implements Transform {}

                                                      constructor

                                                      constructor(schema: GraphQLSchema, args: { [key: string]: any });

                                                        method transformRequest

                                                        transformRequest: (originalRequest: Request) => Request;

                                                          class AddTypenameToAbstract

                                                          class AddTypenameToAbstract implements Transform {}

                                                            constructor

                                                            constructor(targetSchema: GraphQLSchema);

                                                              method transformRequest

                                                              transformRequest: (originalRequest: Request) => Request;

                                                                class CheckResultAndHandleErrors

                                                                class CheckResultAndHandleErrors implements Transform {}

                                                                  constructor

                                                                  constructor(info: GraphQLResolveInfo, fieldName?: string);

                                                                    method transformResult

                                                                    transformResult: (result: any) => any;

                                                                      class ExpandAbstractTypes

                                                                      class ExpandAbstractTypes implements Transform {}

                                                                        constructor

                                                                        constructor(transformedSchema: GraphQLSchema, targetSchema: GraphQLSchema);

                                                                          method transformRequest

                                                                          transformRequest: (originalRequest: Request) => Request;

                                                                            class ExtractField

                                                                            class ExtractField implements Transform {}

                                                                              constructor

                                                                              constructor({ from, to }: { from: Array<string>; to: Array<string> });

                                                                                method transformRequest

                                                                                transformRequest: (originalRequest: Request) => Request;

                                                                                  class FilterRootFields

                                                                                  class FilterRootFields implements Transform {}

                                                                                    constructor

                                                                                    constructor(filter: RootFilter);

                                                                                      method transformSchema

                                                                                      transformSchema: (originalSchema: GraphQLSchema) => GraphQLSchema;

                                                                                        class FilterToSchema

                                                                                        class FilterToSchema implements Transform {}

                                                                                          constructor

                                                                                          constructor(targetSchema: GraphQLSchema);

                                                                                            method transformRequest

                                                                                            transformRequest: (originalRequest: Request) => Request;

                                                                                              class FilterTypes

                                                                                              class FilterTypes implements Transform {}

                                                                                                constructor

                                                                                                constructor(filter: (type: GraphQLNamedType) => boolean);

                                                                                                  method transformSchema

                                                                                                  transformSchema: (schema: GraphQLSchema) => GraphQLSchema;

                                                                                                    class MockList

                                                                                                    class MockList {}

                                                                                                      constructor

                                                                                                      constructor(
                                                                                                      len: number | number[],
                                                                                                      wrappedFunction?: GraphQLFieldResolver<any, any>
                                                                                                      );

                                                                                                        method mock

                                                                                                        mock: (
                                                                                                        root: any,
                                                                                                        args: { [key: string]: any },
                                                                                                        context: any,
                                                                                                        info: GraphQLResolveInfo,
                                                                                                        fieldType: GraphQLList<any>,
                                                                                                        mockTypeFunc: IMockTypeFn
                                                                                                        ) => any[];

                                                                                                          class RenameRootFields

                                                                                                          class RenameRootFields implements Transform {}

                                                                                                            constructor

                                                                                                            constructor(
                                                                                                            renamer: (
                                                                                                            operation: 'Query' | 'Mutation' | 'Subscription',
                                                                                                            name: string,
                                                                                                            field: GraphQLField<any, any>
                                                                                                            ) => string
                                                                                                            );

                                                                                                              method transformSchema

                                                                                                              transformSchema: (originalSchema: GraphQLSchema) => GraphQLSchema;

                                                                                                                class RenameTypes

                                                                                                                class RenameTypes implements Transform {}

                                                                                                                  constructor

                                                                                                                  constructor(
                                                                                                                  renamer: (name: string) => string | undefined,
                                                                                                                  options?: RenameOptions
                                                                                                                  );

                                                                                                                    method transformRequest

                                                                                                                    transformRequest: (originalRequest: Request) => Request;

                                                                                                                      method transformResult

                                                                                                                      transformResult: (result: Result) => Result;

                                                                                                                        method transformSchema

                                                                                                                        transformSchema: (originalSchema: GraphQLSchema) => GraphQLSchema;

                                                                                                                          class ReplaceFieldWithFragment

                                                                                                                          class ReplaceFieldWithFragment implements Transform {}

                                                                                                                            constructor

                                                                                                                            constructor(
                                                                                                                            targetSchema: GraphQLSchema,
                                                                                                                            fragments: { field: string; fragment: string }[]
                                                                                                                            );

                                                                                                                              method transformRequest

                                                                                                                              transformRequest: (originalRequest: Request) => Request;

                                                                                                                                class SchemaDirectiveVisitor

                                                                                                                                class SchemaDirectiveVisitor extends SchemaVisitor {}

                                                                                                                                  constructor

                                                                                                                                  protected constructor(config: {
                                                                                                                                  name: string;
                                                                                                                                  args: { [name: string]: any };
                                                                                                                                  visitedType: VisitableSchemaType;
                                                                                                                                  schema: GraphQLSchema;
                                                                                                                                  context: { [key: string]: any };
                                                                                                                                  });

                                                                                                                                    property args

                                                                                                                                    args: { [name: string]: any };

                                                                                                                                      property context

                                                                                                                                      context: { [key: string]: any };

                                                                                                                                        property name

                                                                                                                                        name: string;

                                                                                                                                          property visitedType

                                                                                                                                          visitedType: any;

                                                                                                                                            method getDeclaredDirectives

                                                                                                                                            protected static getDeclaredDirectives: (
                                                                                                                                            schema: GraphQLSchema,
                                                                                                                                            directiveVisitors: { [directiveName: string]: typeof SchemaDirectiveVisitor }
                                                                                                                                            ) => { [directiveName: string]: GraphQLDirective };

                                                                                                                                              method getDirectiveDeclaration

                                                                                                                                              static getDirectiveDeclaration: (
                                                                                                                                              directiveName: string,
                                                                                                                                              schema: GraphQLSchema
                                                                                                                                              ) => GraphQLDirective;

                                                                                                                                                method visitSchemaDirectives

                                                                                                                                                static visitSchemaDirectives: (
                                                                                                                                                schema: GraphQLSchema,
                                                                                                                                                directiveVisitors: {
                                                                                                                                                [directiveName: string]: typeof SchemaDirectiveVisitor;
                                                                                                                                                },
                                                                                                                                                context?: { [key: string]: any }
                                                                                                                                                ) => { [directiveName: string]: SchemaDirectiveVisitor[] };

                                                                                                                                                  class SchemaError

                                                                                                                                                  class SchemaError extends Error {}

                                                                                                                                                    constructor

                                                                                                                                                    constructor(message: string);

                                                                                                                                                      property message

                                                                                                                                                      message: string;

                                                                                                                                                        class TransformRootFields

                                                                                                                                                        class TransformRootFields implements Transform {}

                                                                                                                                                          constructor

                                                                                                                                                          constructor(transform: RootTransformer);

                                                                                                                                                            method transformSchema

                                                                                                                                                            transformSchema: (originalSchema: GraphQLSchema) => GraphQLSchema;

                                                                                                                                                              class WrapQuery

                                                                                                                                                              class WrapQuery implements Transform {}

                                                                                                                                                                constructor

                                                                                                                                                                constructor(
                                                                                                                                                                path: string[],
                                                                                                                                                                wrapper: QueryWrapper,
                                                                                                                                                                extractor: (result: any) => any
                                                                                                                                                                );

                                                                                                                                                                  method transformRequest

                                                                                                                                                                  transformRequest: (originalRequest: Request) => Request;

                                                                                                                                                                    method transformResult

                                                                                                                                                                    transformResult: (originalResult: Result) => Result;

                                                                                                                                                                      Interfaces

                                                                                                                                                                      interface IAddResolveFunctionsToSchemaOptions

                                                                                                                                                                      interface IAddResolveFunctionsToSchemaOptions {}

                                                                                                                                                                        property inheritResolversFromInterfaces

                                                                                                                                                                        inheritResolversFromInterfaces?: boolean;

                                                                                                                                                                          property resolvers

                                                                                                                                                                          resolvers: IResolvers;

                                                                                                                                                                            property resolverValidationOptions

                                                                                                                                                                            resolverValidationOptions?: IResolverValidationOptions;

                                                                                                                                                                              property schema

                                                                                                                                                                              schema: GraphQLSchema;

                                                                                                                                                                                interface IConnectorCls

                                                                                                                                                                                interface IConnectorCls<TContext = any> {}

                                                                                                                                                                                  construct signature

                                                                                                                                                                                  new (context?: TContext): any;

                                                                                                                                                                                    interface IDelegateToSchemaOptions

                                                                                                                                                                                    interface IDelegateToSchemaOptions<
                                                                                                                                                                                    TContext = {
                                                                                                                                                                                    [key: string]: any;
                                                                                                                                                                                    }
                                                                                                                                                                                    > {}

                                                                                                                                                                                      property args

                                                                                                                                                                                      args?: {
                                                                                                                                                                                      [key: string]: any;
                                                                                                                                                                                      };

                                                                                                                                                                                        property context

                                                                                                                                                                                        context: TContext;

                                                                                                                                                                                          property fieldName

                                                                                                                                                                                          fieldName: string;

                                                                                                                                                                                            property info

                                                                                                                                                                                            info: IGraphQLToolsResolveInfo;

                                                                                                                                                                                              property operation

                                                                                                                                                                                              operation: Operation;

                                                                                                                                                                                                property schema

                                                                                                                                                                                                schema: GraphQLSchema;

                                                                                                                                                                                                  property skipValidation

                                                                                                                                                                                                  skipValidation?: boolean;

                                                                                                                                                                                                    property transforms

                                                                                                                                                                                                    transforms?: Array<Transform>;

                                                                                                                                                                                                      interface IDirectiveResolvers

                                                                                                                                                                                                      interface IDirectiveResolvers<TSource = any, TContext = any> {}

                                                                                                                                                                                                        index signature

                                                                                                                                                                                                        [directiveName: string]: DirectiveResolverFn<TSource, TContext>;

                                                                                                                                                                                                          interface IExecutableSchemaDefinition

                                                                                                                                                                                                          interface IExecutableSchemaDefinition<TContext = any> {}

                                                                                                                                                                                                            property allowUndefinedInResolve

                                                                                                                                                                                                            allowUndefinedInResolve?: boolean;

                                                                                                                                                                                                              property connectors

                                                                                                                                                                                                              connectors?: IConnectors<TContext>;

                                                                                                                                                                                                                property directiveResolvers

                                                                                                                                                                                                                directiveResolvers?: IDirectiveResolvers<any, TContext>;

                                                                                                                                                                                                                  property inheritResolversFromInterfaces

                                                                                                                                                                                                                  inheritResolversFromInterfaces?: boolean;

                                                                                                                                                                                                                    property logger

                                                                                                                                                                                                                    logger?: ILogger;

                                                                                                                                                                                                                      property parseOptions

                                                                                                                                                                                                                      parseOptions?: GraphQLParseOptions;

                                                                                                                                                                                                                        property resolvers

                                                                                                                                                                                                                        resolvers?: IResolvers<any, TContext> | Array<IResolvers<any, TContext>>;

                                                                                                                                                                                                                          property resolverValidationOptions

                                                                                                                                                                                                                          resolverValidationOptions?: IResolverValidationOptions;

                                                                                                                                                                                                                            property schemaDirectives

                                                                                                                                                                                                                            schemaDirectives?: {
                                                                                                                                                                                                                            [name: string]: typeof SchemaDirectiveVisitor;
                                                                                                                                                                                                                            };

                                                                                                                                                                                                                              property typeDefs

                                                                                                                                                                                                                              typeDefs: ITypeDefinitions;

                                                                                                                                                                                                                                interface IGraphQLToolsResolveInfo

                                                                                                                                                                                                                                interface IGraphQLToolsResolveInfo extends GraphQLResolveInfo {}

                                                                                                                                                                                                                                  property mergeInfo

                                                                                                                                                                                                                                  mergeInfo?: MergeInfo;

                                                                                                                                                                                                                                    interface ILogger

                                                                                                                                                                                                                                    interface ILogger {}

                                                                                                                                                                                                                                      property log

                                                                                                                                                                                                                                      log: (message: string | Error) => void;

                                                                                                                                                                                                                                        interface IMockOptions

                                                                                                                                                                                                                                        interface IMockOptions {}

                                                                                                                                                                                                                                          property mocks

                                                                                                                                                                                                                                          mocks?: IMocks;

                                                                                                                                                                                                                                            property preserveResolvers

                                                                                                                                                                                                                                            preserveResolvers?: boolean;

                                                                                                                                                                                                                                              property schema

                                                                                                                                                                                                                                              schema: GraphQLSchema;

                                                                                                                                                                                                                                                interface IMockServer

                                                                                                                                                                                                                                                interface IMockServer {}

                                                                                                                                                                                                                                                  property query

                                                                                                                                                                                                                                                  query: (
                                                                                                                                                                                                                                                  query: string,
                                                                                                                                                                                                                                                  vars?: {
                                                                                                                                                                                                                                                  [key: string]: any;
                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                  ) => Promise<ExecutionResult>;

                                                                                                                                                                                                                                                    interface IResolverOptions

                                                                                                                                                                                                                                                    interface IResolverOptions<TSource = any, TContext = any, TArgs = any> {}

                                                                                                                                                                                                                                                      property fragment

                                                                                                                                                                                                                                                      fragment?: string;

                                                                                                                                                                                                                                                        property resolve

                                                                                                                                                                                                                                                        resolve?: IFieldResolver<TSource, TContext, TArgs>;

                                                                                                                                                                                                                                                          property subscribe

                                                                                                                                                                                                                                                          subscribe?: IFieldResolver<TSource, TContext, TArgs>;

                                                                                                                                                                                                                                                            interface IResolvers

                                                                                                                                                                                                                                                            interface IResolvers<TSource = any, TContext = any> {}

                                                                                                                                                                                                                                                              index signature

                                                                                                                                                                                                                                                              [key: string]:
                                                                                                                                                                                                                                                              | (() => any)
                                                                                                                                                                                                                                                              | IResolverObject<TSource, TContext>
                                                                                                                                                                                                                                                              | IResolverOptions<TSource, TContext>
                                                                                                                                                                                                                                                              | GraphQLScalarType
                                                                                                                                                                                                                                                              | IEnumResolver;

                                                                                                                                                                                                                                                                interface IResolverValidationOptions

                                                                                                                                                                                                                                                                interface IResolverValidationOptions {}

                                                                                                                                                                                                                                                                  property allowResolversNotInSchema

                                                                                                                                                                                                                                                                  allowResolversNotInSchema?: boolean;

                                                                                                                                                                                                                                                                    property requireResolversForAllFields

                                                                                                                                                                                                                                                                    requireResolversForAllFields?: boolean;

                                                                                                                                                                                                                                                                      property requireResolversForArgs

                                                                                                                                                                                                                                                                      requireResolversForArgs?: boolean;

                                                                                                                                                                                                                                                                        property requireResolversForNonScalar

                                                                                                                                                                                                                                                                        requireResolversForNonScalar?: boolean;

                                                                                                                                                                                                                                                                          property requireResolversForResolveType

                                                                                                                                                                                                                                                                          requireResolversForResolveType?: boolean;

                                                                                                                                                                                                                                                                            Type Aliases

                                                                                                                                                                                                                                                                            type DirectiveResolverFn

                                                                                                                                                                                                                                                                            type DirectiveResolverFn<TSource = any, TContext = any> = (
                                                                                                                                                                                                                                                                            next: NextResolverFn,
                                                                                                                                                                                                                                                                            source: TSource,
                                                                                                                                                                                                                                                                            args: {
                                                                                                                                                                                                                                                                            [argName: string]: any;
                                                                                                                                                                                                                                                                            },
                                                                                                                                                                                                                                                                            context: TContext,
                                                                                                                                                                                                                                                                            info: GraphQLResolveInfo
                                                                                                                                                                                                                                                                            ) => any;

                                                                                                                                                                                                                                                                              type GraphQLParseOptions

                                                                                                                                                                                                                                                                              type GraphQLParseOptions = {
                                                                                                                                                                                                                                                                              noLocation?: boolean;
                                                                                                                                                                                                                                                                              allowLegacySDLEmptyFields?: boolean;
                                                                                                                                                                                                                                                                              allowLegacySDLImplementsInterfaces?: boolean;
                                                                                                                                                                                                                                                                              experimentalFragmentVariables?: boolean;
                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                type IConnector

                                                                                                                                                                                                                                                                                type IConnector<TContext = any> = IConnectorCls<TContext> | IConnectorFn<TContext>;

                                                                                                                                                                                                                                                                                  type IConnectorFn

                                                                                                                                                                                                                                                                                  type IConnectorFn<TContext = any> = (context?: TContext) => any;

                                                                                                                                                                                                                                                                                    type IConnectors

                                                                                                                                                                                                                                                                                    type IConnectors<TContext = any> = {
                                                                                                                                                                                                                                                                                    [key: string]: IConnector<TContext>;
                                                                                                                                                                                                                                                                                    };

                                                                                                                                                                                                                                                                                      type IEnumResolver

                                                                                                                                                                                                                                                                                      type IEnumResolver = {
                                                                                                                                                                                                                                                                                      [key: string]: string | number;
                                                                                                                                                                                                                                                                                      };

                                                                                                                                                                                                                                                                                        type IFieldIteratorFn

                                                                                                                                                                                                                                                                                        type IFieldIteratorFn = (
                                                                                                                                                                                                                                                                                        fieldDef: GraphQLField<any, any>,
                                                                                                                                                                                                                                                                                        typeName: string,
                                                                                                                                                                                                                                                                                        fieldName: string
                                                                                                                                                                                                                                                                                        ) => void;

                                                                                                                                                                                                                                                                                          type IFieldResolver

                                                                                                                                                                                                                                                                                          type IFieldResolver<TSource, TContext, TArgs = Record<string, any>> = (
                                                                                                                                                                                                                                                                                          source: TSource,
                                                                                                                                                                                                                                                                                          args: TArgs,
                                                                                                                                                                                                                                                                                          context: TContext,
                                                                                                                                                                                                                                                                                          info: GraphQLResolveInfo & {
                                                                                                                                                                                                                                                                                          mergeInfo: MergeInfo;
                                                                                                                                                                                                                                                                                          }
                                                                                                                                                                                                                                                                                          ) => any;

                                                                                                                                                                                                                                                                                            type IMockFn

                                                                                                                                                                                                                                                                                            type IMockFn = GraphQLFieldResolver<any, any>;

                                                                                                                                                                                                                                                                                              type IMocks

                                                                                                                                                                                                                                                                                              type IMocks = {
                                                                                                                                                                                                                                                                                              [key: string]: IMockFn;
                                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                                type IMockTypeFn

                                                                                                                                                                                                                                                                                                type IMockTypeFn = (
                                                                                                                                                                                                                                                                                                type: GraphQLType,
                                                                                                                                                                                                                                                                                                typeName?: string,
                                                                                                                                                                                                                                                                                                fieldName?: string
                                                                                                                                                                                                                                                                                                ) => GraphQLFieldResolver<any, any>;

                                                                                                                                                                                                                                                                                                  type IResolverObject

                                                                                                                                                                                                                                                                                                  type IResolverObject<TSource = any, TContext = any, TArgs = any> = {
                                                                                                                                                                                                                                                                                                  [key: string]:
                                                                                                                                                                                                                                                                                                  | IFieldResolver<TSource, TContext, TArgs>
                                                                                                                                                                                                                                                                                                  | IResolverOptions<TSource, TContext>
                                                                                                                                                                                                                                                                                                  | IResolverObject<TSource, TContext>;
                                                                                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                                                                                    type IResolversParameter

                                                                                                                                                                                                                                                                                                    type IResolversParameter =
                                                                                                                                                                                                                                                                                                    | Array<IResolvers | ((mergeInfo: MergeInfo) => IResolvers)>
                                                                                                                                                                                                                                                                                                    | IResolvers
                                                                                                                                                                                                                                                                                                    | ((mergeInfo: MergeInfo) => IResolvers);

                                                                                                                                                                                                                                                                                                      type ITypedef

                                                                                                                                                                                                                                                                                                      type ITypedef = (() => ITypedef[]) | string | DocumentNode;

                                                                                                                                                                                                                                                                                                        type ITypeDefinitions

                                                                                                                                                                                                                                                                                                        type ITypeDefinitions = ITypedef | ITypedef[];

                                                                                                                                                                                                                                                                                                          type MergeInfo

                                                                                                                                                                                                                                                                                                          type MergeInfo = {
                                                                                                                                                                                                                                                                                                          delegate: (
                                                                                                                                                                                                                                                                                                          type: 'query' | 'mutation' | 'subscription',
                                                                                                                                                                                                                                                                                                          fieldName: string,
                                                                                                                                                                                                                                                                                                          args: {
                                                                                                                                                                                                                                                                                                          [key: string]: any;
                                                                                                                                                                                                                                                                                                          },
                                                                                                                                                                                                                                                                                                          context: {
                                                                                                                                                                                                                                                                                                          [key: string]: any;
                                                                                                                                                                                                                                                                                                          },
                                                                                                                                                                                                                                                                                                          info: GraphQLResolveInfo,
                                                                                                                                                                                                                                                                                                          transforms?: Array<Transform>
                                                                                                                                                                                                                                                                                                          ) => any;
                                                                                                                                                                                                                                                                                                          delegateToSchema<TContext>(options: IDelegateToSchemaOptions<TContext>): any;
                                                                                                                                                                                                                                                                                                          fragments: Array<{
                                                                                                                                                                                                                                                                                                          field: string;
                                                                                                                                                                                                                                                                                                          fragment: string;
                                                                                                                                                                                                                                                                                                          }>;
                                                                                                                                                                                                                                                                                                          };

                                                                                                                                                                                                                                                                                                            type MergeTypeCandidate

                                                                                                                                                                                                                                                                                                            type MergeTypeCandidate = {
                                                                                                                                                                                                                                                                                                            schema?: GraphQLSchema;
                                                                                                                                                                                                                                                                                                            type: GraphQLNamedType;
                                                                                                                                                                                                                                                                                                            };

                                                                                                                                                                                                                                                                                                              type NextResolverFn

                                                                                                                                                                                                                                                                                                              type NextResolverFn = () => Promise<any>;

                                                                                                                                                                                                                                                                                                                type Operation

                                                                                                                                                                                                                                                                                                                type Operation = 'query' | 'mutation' | 'subscription';

                                                                                                                                                                                                                                                                                                                  type Request

                                                                                                                                                                                                                                                                                                                  type Request = {
                                                                                                                                                                                                                                                                                                                  document: DocumentNode;
                                                                                                                                                                                                                                                                                                                  variables: Record<string, any>;
                                                                                                                                                                                                                                                                                                                  extensions?: Record<string, any>;
                                                                                                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                                                                                                    type ResolveType

                                                                                                                                                                                                                                                                                                                    type ResolveType<T extends GraphQLType> = (type: T) => T;

                                                                                                                                                                                                                                                                                                                      type Result

                                                                                                                                                                                                                                                                                                                      type Result = ExecutionResult & {
                                                                                                                                                                                                                                                                                                                      extensions?: Record<string, any>;
                                                                                                                                                                                                                                                                                                                      };

                                                                                                                                                                                                                                                                                                                        type Transform

                                                                                                                                                                                                                                                                                                                        type Transform = {
                                                                                                                                                                                                                                                                                                                        transformSchema?: (schema: GraphQLSchema) => GraphQLSchema;
                                                                                                                                                                                                                                                                                                                        transformRequest?: (originalRequest: Request) => Request;
                                                                                                                                                                                                                                                                                                                        transformResult?: (result: Result) => Result;
                                                                                                                                                                                                                                                                                                                        };

                                                                                                                                                                                                                                                                                                                          type TypeWithResolvers

                                                                                                                                                                                                                                                                                                                          type TypeWithResolvers = {
                                                                                                                                                                                                                                                                                                                          type: GraphQLNamedType;
                                                                                                                                                                                                                                                                                                                          resolvers?: IResolvers;
                                                                                                                                                                                                                                                                                                                          };

                                                                                                                                                                                                                                                                                                                            type UnitOrList

                                                                                                                                                                                                                                                                                                                            type UnitOrList<Type> = Type | Array<Type>;

                                                                                                                                                                                                                                                                                                                              type VisitType

                                                                                                                                                                                                                                                                                                                              type VisitType = (
                                                                                                                                                                                                                                                                                                                              name: string,
                                                                                                                                                                                                                                                                                                                              candidates: Array<MergeTypeCandidate>
                                                                                                                                                                                                                                                                                                                              ) => VisitTypeResult;

                                                                                                                                                                                                                                                                                                                                type VisitTypeResult

                                                                                                                                                                                                                                                                                                                                type VisitTypeResult = GraphQLNamedType | TypeWithResolvers | null;

                                                                                                                                                                                                                                                                                                                                  Package Files (38)

                                                                                                                                                                                                                                                                                                                                  Dependencies (5)

                                                                                                                                                                                                                                                                                                                                  Dev Dependencies (22)

                                                                                                                                                                                                                                                                                                                                  Peer Dependencies (1)

                                                                                                                                                                                                                                                                                                                                  Badge

                                                                                                                                                                                                                                                                                                                                  To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                                                                                                                                                  You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@kamilkisiela/graphql-tools.

                                                                                                                                                                                                                                                                                                                                  • Markdown
                                                                                                                                                                                                                                                                                                                                    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@kamilkisiela/graphql-tools)
                                                                                                                                                                                                                                                                                                                                  • HTML
                                                                                                                                                                                                                                                                                                                                    <a href="https://www.jsdocs.io/package/@kamilkisiela/graphql-tools"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>