@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: any;

      Functions

      function addCatchUndefinedToSchema

      addCatchUndefinedToSchema: (schema: any) => void;

        function addErrorLoggingToSchema

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

          function addMockFunctionsToSchema

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

            function addResolveFunctionsToSchema

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

              function addSchemaLevelResolveFunction

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

                function assertResolveFunctionsPresent

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

                  function attachDirectiveResolvers

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

                    function buildSchemaFromTypeDefinitions

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

                      function chainResolvers

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

                        function checkForResolveTypeResolver

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

                          function concatenateTypeDefs

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

                            function decorateWithLogger

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

                              function defaultCreateRemoteResolver

                              defaultCreateRemoteResolver: (fetcher: Fetcher) => any;

                                function delegateToSchema

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

                                  function extendResolversFromInterfaces

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

                                    function extractExtensionDefinitions

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

                                      function forEachField

                                      forEachField: (schema: any, 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>) => any;

                                            function makeRemoteExecutableSchema

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

                                              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;
                                              }) => any;

                                                function mockServer

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

                                                  function transformSchema

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

                                                    Classes

                                                    class AddArgumentsAsVariables

                                                    class AddArgumentsAsVariablesTransform implements Transform {}

                                                      constructor

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

                                                        method transformRequest

                                                        transformRequest: (originalRequest: Request) => Request;

                                                          class AddTypenameToAbstract

                                                          class AddTypenameToAbstract implements Transform {}

                                                            constructor

                                                            constructor(targetSchema: any);

                                                              method transformRequest

                                                              transformRequest: (originalRequest: Request) => Request;

                                                                class CheckResultAndHandleErrors

                                                                class CheckResultAndHandleErrors implements Transform {}

                                                                  constructor

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

                                                                    method transformResult

                                                                    transformResult: (result: any) => any;

                                                                      class ExpandAbstractTypes

                                                                      class ExpandAbstractTypes implements Transform {}

                                                                        constructor

                                                                        constructor(transformedSchema: any, targetSchema: any);

                                                                          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: any) => any;

                                                                                        class FilterToSchema

                                                                                        class FilterToSchema implements Transform {}

                                                                                          constructor

                                                                                          constructor(targetSchema: any);

                                                                                            method transformRequest

                                                                                            transformRequest: (originalRequest: Request) => Request;

                                                                                              class FilterTypes

                                                                                              class FilterTypes implements Transform {}

                                                                                                constructor

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

                                                                                                  method transformSchema

                                                                                                  transformSchema: (schema: any) => any;

                                                                                                    class MockList

                                                                                                    class MockList {}

                                                                                                      constructor

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

                                                                                                        method mock

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

                                                                                                          class RenameRootFields

                                                                                                          class RenameRootFields implements Transform {}

                                                                                                            constructor

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

                                                                                                              method transformSchema

                                                                                                              transformSchema: (originalSchema: any) => any;

                                                                                                                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: any) => any;

                                                                                                                          class ReplaceFieldWithFragment

                                                                                                                          class ReplaceFieldWithFragment implements Transform {}

                                                                                                                            constructor

                                                                                                                            constructor(targetSchema: any, 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: any;
                                                                                                                                  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: any,
                                                                                                                                            directiveVisitors: { [directiveName: string]: typeof SchemaDirectiveVisitor }
                                                                                                                                            ) => { [directiveName: string]: any };

                                                                                                                                              method getDirectiveDeclaration

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

                                                                                                                                                method visitSchemaDirectives

                                                                                                                                                static visitSchemaDirectives: (
                                                                                                                                                schema: any,
                                                                                                                                                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: any) => any;

                                                                                                                                                              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>