Package graphql.schema.visibility
Class BlockedFields
- java.lang.Object
-
- graphql.schema.visibility.BlockedFields
-
- All Implemented Interfaces:
GraphqlFieldVisibility
@PublicApi public class BlockedFields extends java.lang.Object implements GraphqlFieldVisibility
This helper class will take a list of regular expressions and match them against the fully qualified name of a type and its fields. So for example an object type called "User" with an inner field called "firstName" will have a fully qualified name of "User.firstName" in terms of pattern matching. Remember that graphql type and fields names MUST be inside the name space "[_A-Za-z][_0-9A-Za-z]*"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBlockedFields.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GraphQLFieldDefinitiongetFieldDefinition(GraphQLFieldsContainer fieldsContainer, java.lang.String fieldName)Called to get a named field from an object type or interfaceGraphQLInputObjectFieldgetFieldDefinition(GraphQLInputFieldsContainer fieldsContainer, java.lang.String fieldName)Called to get a named field from an input object typejava.util.List<GraphQLFieldDefinition>getFieldDefinitions(GraphQLFieldsContainer fieldsContainer)Called to get the list of fields from an object type or interfacejava.util.List<GraphQLInputObjectField>getFieldDefinitions(GraphQLInputFieldsContainer fieldsContainer)Called to get the list of fields from an input object typestatic BlockedFields.BuildernewBlock()
-
-
-
Method Detail
-
getFieldDefinitions
public java.util.List<GraphQLFieldDefinition> getFieldDefinitions(GraphQLFieldsContainer fieldsContainer)
Description copied from interface:GraphqlFieldVisibilityCalled to get the list of fields from an object type or interface- Specified by:
getFieldDefinitionsin interfaceGraphqlFieldVisibility- Parameters:
fieldsContainer- the type in play- Returns:
- a non null list of
GraphQLFieldDefinitions
-
getFieldDefinition
public GraphQLFieldDefinition getFieldDefinition(GraphQLFieldsContainer fieldsContainer, java.lang.String fieldName)
Description copied from interface:GraphqlFieldVisibilityCalled to get a named field from an object type or interface- Specified by:
getFieldDefinitionin interfaceGraphqlFieldVisibility- Parameters:
fieldsContainer- the type in playfieldName- the name of the desired field- Returns:
- a
GraphQLFieldDefinitionor null if it's not visible
-
getFieldDefinitions
public java.util.List<GraphQLInputObjectField> getFieldDefinitions(GraphQLInputFieldsContainer fieldsContainer)
Description copied from interface:GraphqlFieldVisibilityCalled to get the list of fields from an input object type- Specified by:
getFieldDefinitionsin interfaceGraphqlFieldVisibility- Parameters:
fieldsContainer- the type in play- Returns:
- a non null list of
GraphQLInputObjectFields
-
getFieldDefinition
public GraphQLInputObjectField getFieldDefinition(GraphQLInputFieldsContainer fieldsContainer, java.lang.String fieldName)
Description copied from interface:GraphqlFieldVisibilityCalled to get a named field from an input object type- Specified by:
getFieldDefinitionin interfaceGraphqlFieldVisibility- Parameters:
fieldsContainer- the type in playfieldName- the name of the desired field- Returns:
- a
GraphQLInputObjectFieldor null if it's not visible
-
newBlock
public static BlockedFields.Builder newBlock()
-
-