Skip to Content
GraphQL Tools
DocumentationAPI@graphql-tools/schemasrcinterfacesIExecutableSchemaDefinition

Interface: IExecutableSchemaDefinition<TContext>

Defined in: packages/schema/src/types.ts:18 

Configuration object for creating an executable schema

Extends

Type Parameters

TContext

TContext = any

Properties

allowLegacySDLEmptyFields?

optional allowLegacySDLEmptyFields?: boolean

Defined in: packages/utils/src/Interfaces.ts:161 

Inherited from

GraphQLParseOptions.allowLegacySDLEmptyFields


allowLegacySDLImplementsInterfaces?

optional allowLegacySDLImplementsInterfaces?: boolean

Defined in: packages/utils/src/Interfaces.ts:162 

Inherited from

GraphQLParseOptions.allowLegacySDLImplementsInterfaces


assumeValid?

optional assumeValid?: boolean

Defined in: node_modules/graphql/type/schema.d.mts:612

Internal

When building a schema from a GraphQL service’s introspection result, it might be safe to assume the schema is valid. Set to true to assume the produced schema is valid.

Default: false

Inherited from

BuildSchemaOptions.assumeValid


assumeValidSDL?

optional assumeValidSDL?: boolean

Defined in: node_modules/graphql/utilities/buildASTSchema.d.mts:14

Set to true to assume the SDL is valid.

Default: false

Inherited from

BuildSchemaOptions.assumeValidSDL


commentDescriptions?

optional commentDescriptions?: boolean

Defined in: packages/utils/src/Interfaces.ts:169 

Set to true in order to convert all GraphQL comments (marked with # sign) to descriptions (""") GraphQL has built-in support for transforming descriptions to comments (with print), but not while parsing. Turning the flag on will support the other way as well (parse)

Inherited from

GraphQLParseOptions.commentDescriptions


defaultFieldResolver?

optional defaultFieldResolver?: GraphQLFieldResolver<any, TContext>

Defined in: packages/schema/src/types.ts:48 

Default field resolver


experimentalFragmentVariables?

optional experimentalFragmentVariables?: boolean

Defined in: packages/utils/src/Interfaces.ts:163 

Inherited from

GraphQLParseOptions.experimentalFragmentVariables


inheritResolversFromInterfaces?

optional inheritResolversFromInterfaces?: boolean

Defined in: packages/schema/src/types.ts:36 

GraphQL object types that implement interfaces will inherit any missing resolvers from their interface types defined in the resolvers object


noLocation?

optional noLocation?: boolean

Defined in: packages/utils/src/Interfaces.ts:160 

Inherited from

GraphQLParseOptions.noLocation


onFieldTypeConflict?

optional onFieldTypeConflict?: OnFieldTypeConflict

Defined in: packages/schema/src/types.ts:63 

Called when two fields share a name and field conflicts are not ignored, even if their types already match. Return the field node that should win.

Example

Given:

type Post { content: String! } type Post { content: String }

onFieldTypeConflict: (_existing, incoming) => incoming keeps content: String. Fields that exist on only one schema are still kept.


resolvers?

optional resolvers?: IResolvers<any, TContext> | IResolvers<any, TContext>[]

Defined in: packages/schema/src/types.ts:27 

Object describing the field resolvers for the provided type definitions


resolverValidationOptions?

optional resolverValidationOptions?: IResolverValidationOptions

Defined in: packages/schema/src/types.ts:31 

Additional options for validating the provided resolvers


reverseArguments?

optional reverseArguments?: boolean

Defined in: packages/schema/src/types.ts:69 

Reverse argument merge order when combining field arguments. Use with onFieldTypeConflict: (existing) => existing to keep earlier argument types while still adding new arguments from the incoming field.


schemaExtensions?

optional schemaExtensions?: SchemaExtensions | SchemaExtensions[]

Defined in: packages/schema/src/types.ts:44 

Schema extensions


typeDefs

typeDefs: TypeSource

Defined in: packages/schema/src/types.ts:23 

The type definitions used to create the schema


updateResolversInPlace?

optional updateResolversInPlace?: boolean

Defined in: packages/schema/src/types.ts:40 

Do not create a schema again and use the one from buildASTSchema