Skip to Content
GraphQL Tools
DocumentationAPILoadersjson-filesrcinterfacesJsonFileLoaderOptions

Interface: JsonFileLoaderOptions

Defined in: packages/loaders/json-file/src/index.ts:22 

Additional options for loading from a JSON file

Extends

Properties

allowLegacySDLEmptyFields?

optional allowLegacySDLEmptyFields?: boolean

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

Inherited from

BaseLoaderOptions.allowLegacySDLEmptyFields


allowLegacySDLImplementsInterfaces?

optional allowLegacySDLImplementsInterfaces?: boolean

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

Inherited from

BaseLoaderOptions.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

BaseLoaderOptions.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

BaseLoaderOptions.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

BaseLoaderOptions.commentDescriptions


cwd?

optional cwd?: string

Defined in: packages/utils/src/loaders.ts:19 

Inherited from

BaseLoaderOptions.cwd


errorHandling?

optional errorHandling?: LoadErrorHandling

Defined in: packages/utils/src/loaders.ts:31 

How to handle a parse or load failure for one source.

  • throw (default): throw the first error. Other sources from the same pointer are not returned.
  • aggregate: collect every failed source, then throw AggregateError.
  • return: do not throw. Failed sources are { location, error } with no document.

Inherited from

BaseLoaderOptions.errorHandling


experimentalFragmentVariables?

optional experimentalFragmentVariables?: boolean

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

Inherited from

BaseLoaderOptions.experimentalFragmentVariables


ignore?

optional ignore?: string | string[]

Defined in: packages/utils/src/loaders.ts:20 

Inherited from

BaseLoaderOptions.ignore


includeSources?

optional includeSources?: boolean

Defined in: packages/utils/src/loaders.ts:21 

Inherited from

BaseLoaderOptions.includeSources


noLocation?

optional noLocation?: boolean

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

Inherited from

BaseLoaderOptions.noLocation