Package graphql.schema.visibility
Interface GraphqlFieldVisibility
-
- All Known Implementing Classes:
BlockedFields
,DefaultGraphqlFieldVisibility
,NoIntrospectionGraphqlFieldVisibility
@PublicApi public interface GraphqlFieldVisibility
This allows you to control the visibility of graphql fields. By default graphql-java makes every defined field visible but you can implement an instance of this interface and reduce specific field visibility.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description GraphQLFieldDefinition
getFieldDefinition(GraphQLFieldsContainer fieldsContainer, java.lang.String fieldName)
Called to get a named field from an object type or interfacedefault GraphQLInputObjectField
getFieldDefinition(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 interfacedefault java.util.List<GraphQLInputObjectField>
getFieldDefinitions(GraphQLInputFieldsContainer fieldsContainer)
Called to get the list of fields from an input object type
-
-
-
Method Detail
-
getFieldDefinitions
java.util.List<GraphQLFieldDefinition> getFieldDefinitions(GraphQLFieldsContainer fieldsContainer)
Called to get the list of fields from an object type or interface- Parameters:
fieldsContainer
- the type in play- Returns:
- a non null list of
GraphQLFieldDefinition
s
-
getFieldDefinition
GraphQLFieldDefinition getFieldDefinition(GraphQLFieldsContainer fieldsContainer, java.lang.String fieldName)
Called to get a named field from an object type or interface- Parameters:
fieldsContainer
- the type in playfieldName
- the name of the desired field- Returns:
- a
GraphQLFieldDefinition
or null if it's not visible
-
getFieldDefinitions
default java.util.List<GraphQLInputObjectField> getFieldDefinitions(GraphQLInputFieldsContainer fieldsContainer)
Called to get the list of fields from an input object type- Parameters:
fieldsContainer
- the type in play- Returns:
- a non null list of
GraphQLInputObjectField
s
-
getFieldDefinition
default GraphQLInputObjectField getFieldDefinition(GraphQLInputFieldsContainer fieldsContainer, java.lang.String fieldName)
Called to get a named field from an input object type- Parameters:
fieldsContainer
- the type in playfieldName
- the name of the desired field- Returns:
- a
GraphQLInputObjectField
or null if it's not visible
-
-