Package graphql.validation
Class ValidationContext
- java.lang.Object
-
- graphql.validation.ValidationContext
-
public class ValidationContext extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private Documentdocumentprivate java.util.Map<java.lang.String,FragmentDefinition>fragmentDefinitionMapprivate GraphQLContextgraphQLContextprivate I18ni18nprivate GraphQLSchemaschemaprivate TraversalContexttraversalContext
-
Constructor Summary
Constructors Constructor Description ValidationContext(GraphQLSchema schema, Document document, I18n i18n)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidbuildFragmentMap()GraphQLArgumentgetArgument()InputValueWithStategetDefaultValue()GraphQLDirectivegetDirective()DocumentgetDocument()GraphQLFieldDefinitiongetFieldDef()FragmentDefinitiongetFragment(java.lang.String name)GraphQLContextgetGraphQLContext()I18ngetI18n()GraphQLInputTypegetInputType()GraphQLOutputTypegetOutputType()GraphQLCompositeTypegetParentType()java.util.List<java.lang.String>getQueryPath()GraphQLSchemagetSchema()TraversalContextgetTraversalContext()java.lang.Stringi18n(java.lang.String msgKey, java.lang.Object... msgArgs)Creates an I18N message using the key and argumentsjava.lang.StringtoString()
-
-
-
Field Detail
-
schema
private final GraphQLSchema schema
-
document
private final Document document
-
traversalContext
private final TraversalContext traversalContext
-
fragmentDefinitionMap
private final java.util.Map<java.lang.String,FragmentDefinition> fragmentDefinitionMap
-
i18n
private final I18n i18n
-
graphQLContext
private final GraphQLContext graphQLContext
-
-
Constructor Detail
-
ValidationContext
public ValidationContext(GraphQLSchema schema, Document document, I18n i18n)
-
-
Method Detail
-
buildFragmentMap
private void buildFragmentMap()
-
getTraversalContext
public TraversalContext getTraversalContext()
-
getSchema
public GraphQLSchema getSchema()
-
getDocument
public Document getDocument()
-
getFragment
public FragmentDefinition getFragment(java.lang.String name)
-
getParentType
public GraphQLCompositeType getParentType()
-
getInputType
public GraphQLInputType getInputType()
-
getDefaultValue
public InputValueWithState getDefaultValue()
-
getFieldDef
public GraphQLFieldDefinition getFieldDef()
-
getDirective
public GraphQLDirective getDirective()
-
getArgument
public GraphQLArgument getArgument()
-
getOutputType
public GraphQLOutputType getOutputType()
-
getQueryPath
public java.util.List<java.lang.String> getQueryPath()
-
getI18n
public I18n getI18n()
-
getGraphQLContext
public GraphQLContext getGraphQLContext()
-
i18n
public java.lang.String i18n(java.lang.String msgKey, java.lang.Object... msgArgs)Creates an I18N message using the key and arguments- Parameters:
msgKey- the key in the underlying message bundlemsgArgs- the message arguments- Returns:
- the formatted I18N message
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-