Class KobbySchemaAnalyzeExtension
-
- All Implemented Interfaces:
public class KobbySchemaAnalyzeExtensionkobbySchemaAnalyzetask configuration.This task prints a report to the console with all GraphQL types and fields that match the query.
-
-
Field Summary
Fields Modifier and Type Field Description private BooleantruncatedSchemaprivate Integerdepthprivate IntegerreportLengthLimitprivate IntegerprintMinWeightprivate BooleanprintOverrideprivate BooleanprintArgumentTypesprivate BooleanprintSuperTypesprivate BooleanprintSubTypesprivate BooleanregexEnabledprivate BooleancaseSensitive
-
Constructor Summary
Constructors Constructor Description KobbySchemaAnalyzeExtension()
-
Method Summary
Modifier and Type Method Description final BooleangetTruncatedSchema()true- use a truncated GraphQL schema for analysis.false- use the original GraphQL schema for analysis.
final UnitsetTruncatedSchema(Boolean truncatedSchema)true- use a truncated GraphQL schema for analysis.false- use the original GraphQL schema for analysis.
final IntegergetDepth()GraphQL schema analysis depth. final UnitsetDepth(Integer depth)GraphQL schema analysis depth. final IntegergetReportLengthLimit()GraphQL schema analysis report length limit. final UnitsetReportLengthLimit(Integer reportLengthLimit)GraphQL schema analysis report length limit. final IntegergetPrintMinWeight()The minimum weight of a GraphQL type that should be printed in the report. final UnitsetPrintMinWeight(Integer printMinWeight)The minimum weight of a GraphQL type that should be printed in the report. final BooleangetPrintOverride()Print "override sign" ( ^) in report for overridden GraphQL type fields.final UnitsetPrintOverride(Boolean printOverride)Print "override sign" ( ^) in report for overridden GraphQL type fields.final BooleangetPrintArgumentTypes()Print GraphQL field argument types in a report. final UnitsetPrintArgumentTypes(Boolean printArgumentTypes)Print GraphQL field argument types in a report. final BooleangetPrintSuperTypes()Print GraphQL field supertypes in report ( <-followed by a list of supertypes).final UnitsetPrintSuperTypes(Boolean printSuperTypes)Print GraphQL field supertypes in report ( <-followed by a list of supertypes).final BooleangetPrintSubTypes()Print GraphQL field subtypes in report ( ->followed by a list of subtypes).final UnitsetPrintSubTypes(Boolean printSubTypes)Print GraphQL field subtypes in report ( ->followed by a list of subtypes).final BooleangetRegexEnabled()Is Regex enabled in GraphQL schema analyze query. final UnitsetRegexEnabled(Boolean regexEnabled)Is Regex enabled in GraphQL schema analyze query. final BooleangetCaseSensitive()Are patterns used in a GraphQL schema analyze query case sensitive. final UnitsetCaseSensitive(Boolean caseSensitive)Are patterns used in a GraphQL schema analyze query case sensitive. final UnitbyQuery(Action<KobbySchemaQueryExtension> action)A query used to analyze the GraphQL schema. -
-
Method Detail
-
getTruncatedSchema
final Boolean getTruncatedSchema()
true- use a truncated GraphQL schema for analysis.false- use the original GraphQL schema for analysis.
Default: true
-
setTruncatedSchema
final Unit setTruncatedSchema(Boolean truncatedSchema)
true- use a truncated GraphQL schema for analysis.false- use the original GraphQL schema for analysis.
Default: true
-
getDepth
final Integer getDepth()
GraphQL schema analysis depth. Use -1 to analyse a schema with unlimited depth.
Default: 1
-
setDepth
final Unit setDepth(Integer depth)
GraphQL schema analysis depth. Use -1 to analyse a schema with unlimited depth.
Default: 1
-
getReportLengthLimit
final Integer getReportLengthLimit()
GraphQL schema analysis report length limit. Use -1 to print a report with unlimited length.
Default: 10000
-
setReportLengthLimit
final Unit setReportLengthLimit(Integer reportLengthLimit)
GraphQL schema analysis report length limit. Use -1 to print a report with unlimited length.
Default: 10000
-
getPrintMinWeight
final Integer getPrintMinWeight()
The minimum weight of a GraphQL type that should be printed in the report.
The GraphQL type weight is the number of GraphQL types (excluding scalars) that are available for querying on a field that returns the given type.
Default: 2
-
setPrintMinWeight
final Unit setPrintMinWeight(Integer printMinWeight)
The minimum weight of a GraphQL type that should be printed in the report.
The GraphQL type weight is the number of GraphQL types (excluding scalars) that are available for querying on a field that returns the given type.
Default: 2
-
getPrintOverride
final Boolean getPrintOverride()
Print "override sign" (
^) in report for overridden GraphQL type fields.Default: false
-
setPrintOverride
final Unit setPrintOverride(Boolean printOverride)
Print "override sign" (
^) in report for overridden GraphQL type fields.Default: false
-
getPrintArgumentTypes
final Boolean getPrintArgumentTypes()
Print GraphQL field argument types in a report.
Default: false
-
setPrintArgumentTypes
final Unit setPrintArgumentTypes(Boolean printArgumentTypes)
Print GraphQL field argument types in a report.
Default: false
-
getPrintSuperTypes
final Boolean getPrintSuperTypes()
Print GraphQL field supertypes in report (
<-followed by a list of supertypes).Default: false
-
setPrintSuperTypes
final Unit setPrintSuperTypes(Boolean printSuperTypes)
Print GraphQL field supertypes in report (
<-followed by a list of supertypes).Default: false
-
getPrintSubTypes
final Boolean getPrintSubTypes()
Print GraphQL field subtypes in report (
->followed by a list of subtypes).Default: false
-
setPrintSubTypes
final Unit setPrintSubTypes(Boolean printSubTypes)
Print GraphQL field subtypes in report (
->followed by a list of subtypes).Default: false
-
getRegexEnabled
final Boolean getRegexEnabled()
Is Regex enabled in GraphQL schema analyze query. By default, a simplified Kobby Pattern is used:
?- matches one character.*- matches zero or more characters.|- OR operator.__query- alias forQuerytype.__mutation- alias forMutationtype.__subscription- alias forSubscriptiontype.__root- alias forQuery,MutationandSubscriptiontypes.__any- alias for any type in the GraphQL schema.__anyScalar- alias for any scalar in the GraphQL schema.__anyObject- alias for any object in the GraphQL schema.__anyInterface- alias for any interface in the GraphQL schema.__anyUnion- alias for any union in the GraphQL schema.__anyEnum- alias for any enum in the GraphQL schema.__anyInput- alias for any input object in the GraphQL schema.
Default: false
-
setRegexEnabled
final Unit setRegexEnabled(Boolean regexEnabled)
Is Regex enabled in GraphQL schema analyze query. By default, a simplified Kobby Pattern is used:
?- matches one character.*- matches zero or more characters.|- OR operator.__query- alias forQuerytype.__mutation- alias forMutationtype.__subscription- alias forSubscriptiontype.__root- alias forQuery,MutationandSubscriptiontypes.__any- alias for any type in the GraphQL schema.__anyScalar- alias for any scalar in the GraphQL schema.__anyObject- alias for any object in the GraphQL schema.__anyInterface- alias for any interface in the GraphQL schema.__anyUnion- alias for any union in the GraphQL schema.__anyEnum- alias for any enum in the GraphQL schema.__anyInput- alias for any input object in the GraphQL schema.
Default: false
-
getCaseSensitive
final Boolean getCaseSensitive()
Are patterns used in a GraphQL schema analyze query case sensitive.
Default: true
-
setCaseSensitive
final Unit setCaseSensitive(Boolean caseSensitive)
Are patterns used in a GraphQL schema analyze query case sensitive.
Default: true
-
byQuery
final Unit byQuery(Action<KobbySchemaQueryExtension> action)
A query used to analyze the GraphQL schema.
The
kobbySchemaAnalyzetask prints a report to the console with the GraphQL types and fields matches to the given query.Default:
byQuery { forRoot { include { field("*") } } }
-
-
-