graphql-tools-monorepo / merge/src / Config
Interface: Config
merge/src.Config
Hierarchy
-
ParseOptions
-
GetDocumentNodeFromSchemaOptions
↳
Config
Table of contents
Properties
- allowLegacyFragmentVariables
- commentDescriptions
- consistentEnumMerge
- convertExtensions
- exclusions
- forceSchemaDefinition
- ignoreFieldConflicts
- maxTokens
- noLocation
- onFieldTypeConflict
- pathToDirectivesInExtensions
- reverseArguments
- reverseDirectives
- sort
- throwOnConflict
- useSchemaDefinition
Properties
allowLegacyFragmentVariables
• Optional
allowLegacyFragmentVariables: boolean
Deprecated
will be removed in the v17.0.0
If enabled, the parser will understand and parse variable definitions
contained in a fragment definition. They’ll be represented in the
variableDefinitions
field of the FragmentDefinitionNode.
The syntax is identical to normal, query-defined variables. For example:
fragment A($var: Boolean = false) on T {
...
}
Inherited from
ParseOptions.allowLegacyFragmentVariables
Defined in
node_modules/graphql/language/parser.d.ts:90
commentDescriptions
• Optional
commentDescriptions: boolean
Descriptions are defined as preceding string literals, however an older experimental version of the SDL supported preceding comments as descriptions. Set to true to enable this deprecated behavior. This option is provided to ease adoption and will be removed in v16.
Default: false
Defined in
packages/merge/src/typedefs-mergers/merge-typedefs.ts:56
consistentEnumMerge
• Optional
consistentEnumMerge: boolean
Defined in
packages/merge/src/typedefs-mergers/merge-typedefs.ts:78
convertExtensions
• Optional
convertExtensions: boolean
Defined in
packages/merge/src/typedefs-mergers/merge-typedefs.ts:77
exclusions
• Optional
exclusions: string
[]
Defined in
packages/merge/src/typedefs-mergers/merge-typedefs.ts:75
forceSchemaDefinition
• Optional
forceSchemaDefinition: boolean
Creates schema definition, even when no types are available
Produces: schema { query: Query }
Default: false
Defined in
packages/merge/src/typedefs-mergers/merge-typedefs.ts:41
ignoreFieldConflicts
• Optional
ignoreFieldConflicts: boolean
Defined in
packages/merge/src/typedefs-mergers/merge-typedefs.ts:79
maxTokens
• Optional
maxTokens: number
Parser CPU and memory usage is linear to the number of tokens in a document however in extreme cases it becomes quadratic due to memory exhaustion. Parsing happens before validation so even invalid queries can burn lots of CPU time and memory. To prevent this you can set a maximum number of tokens allowed within a document.
Inherited from
ParseOptions.maxTokens
Defined in
node_modules/graphql/language/parser.d.ts:74
noLocation
• Optional
noLocation: boolean
By default, the parser creates AST nodes that know the location in the source that they correspond to. This configuration flag disables that behavior for performance or testing.
Inherited from
ParseOptions.noLocation
Defined in
node_modules/graphql/language/parser.d.ts:66
onFieldTypeConflict
• Optional
onFieldTypeConflict: OnFieldTypeConflict
Called if types of the same fields are different
Default: false
@example: Given:
type User { a: String }
type User { a: Int }
Instead of throwing already defined with a different type
error,
onFieldTypeConflict
function is called.
Defined in
packages/merge/src/typedefs-mergers/merge-typedefs.ts:95
pathToDirectivesInExtensions
• Optional
pathToDirectivesInExtensions: string
[]
Inherited from
GetDocumentNodeFromSchemaOptions.pathToDirectivesInExtensions
Defined in
packages/utils/src/types.ts:23
reverseArguments
• Optional
reverseArguments: boolean
Defined in
packages/merge/src/typedefs-mergers/merge-typedefs.ts:96
reverseDirectives
• Optional
reverseDirectives: boolean
Puts the next directive first.
Default: false
@example: Given:
type User { a: String @foo }
type User { a: String @bar }
Results:
type User { a: @bar @foo }
Defined in
packages/merge/src/typedefs-mergers/merge-typedefs.ts:74
sort
• Optional
sort: boolean
| CompareFn
<string
>
Defined in
packages/merge/src/typedefs-mergers/merge-typedefs.ts:76
throwOnConflict
• Optional
throwOnConflict: boolean
Throws an error on a merge conflict
Default: false
Defined in
packages/merge/src/typedefs-mergers/merge-typedefs.ts:47
useSchemaDefinition
• Optional
useSchemaDefinition: boolean
Produces schema { query: ..., mutation: ..., subscription: ... }
Default: true