Package graphql.schema.visibility
Interface GraphqlFieldVisibility
- All Known Implementing Classes:
BlockedFields,DefaultGraphqlFieldVisibility,NoIntrospectionGraphqlFieldVisibility
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
Modifier and TypeMethodDescriptiongetFieldDefinition(GraphQLFieldsContainer fieldsContainer, String fieldName) Called to get a named field from an object type or interfacedefault GraphQLInputObjectFieldgetFieldDefinition(GraphQLInputFieldsContainer fieldsContainer, String fieldName) Called to get a named field from an input object typegetFieldDefinitions(GraphQLFieldsContainer fieldsContainer) Called to get the list of fields from an object type or interfacedefault List<GraphQLInputObjectField> getFieldDefinitions(GraphQLInputFieldsContainer fieldsContainer) Called to get the list of fields from an input object type
-
Method Details
-
getFieldDefinitions
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
GraphQLFieldDefinitions
-
getFieldDefinition
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
GraphQLFieldDefinitionor null if it's not visible
-
getFieldDefinitions
default 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
GraphQLInputObjectFields
-
getFieldDefinition
default GraphQLInputObjectField getFieldDefinition(GraphQLInputFieldsContainer fieldsContainer, 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
GraphQLInputObjectFieldor null if it's not visible
-