Class GraphQLSchemaImpl
java.lang.Object
se.liu.ida.hefquin.engine.wrappers.graphql.data.impl.GraphQLSchemaImpl
- All Implemented Interfaces:
GraphQLSchema
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<String,Map<GraphQLEntrypointType, GraphQLEntrypoint>> protected final Map<String,Map<String, GraphQLField>> -
Constructor Summary
ConstructorsConstructorDescriptionGraphQLSchemaImpl(Map<String, Map<String, GraphQLField>> objectTypeToFields, Map<String, Map<GraphQLEntrypointType, GraphQLEntrypoint>> objectTypeToEntrypoint) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsGraphQLField(String objectTypeName, String fieldName) Verifies that a field with the name @param fieldName exists for a GraphQL object type with the name @param objectTypeName in the endpoint (as defined by its schema).booleancontainsGraphQLObjectType(String objectTypeName) Verifies that a GraphQL object type with the name @param objectTypeName exists for the endpoint (as defined by its schema).getEntrypoint(String objectTypeName, GraphQLEntrypointType fieldType) getGraphQLFieldType(String objectTypeName, String fieldName) getGraphQLFieldValueType(String objectTypeName, String fieldName) getGraphQLObjectFields(String objectTypeName) toString()
-
Field Details
-
objectTypeToFields
-
objectTypeToEntrypoint
-
-
Constructor Details
-
GraphQLSchemaImpl
public GraphQLSchemaImpl(Map<String, Map<String, GraphQLField>> objectTypeToFields, Map<String, Map<GraphQLEntrypointType, GraphQLEntrypoint>> objectTypeToEntrypoint)
-
-
Method Details
-
containsGraphQLObjectType
Description copied from interface:GraphQLSchemaVerifies that a GraphQL object type with the name @param objectTypeName exists for the endpoint (as defined by its schema).- Specified by:
containsGraphQLObjectTypein interfaceGraphQLSchema
-
containsGraphQLField
Description copied from interface:GraphQLSchemaVerifies that a field with the name @param fieldName exists for a GraphQL object type with the name @param objectTypeName in the endpoint (as defined by its schema).- Specified by:
containsGraphQLFieldin interfaceGraphQLSchema
-
getGraphQLFieldType
- Specified by:
getGraphQLFieldTypein interfaceGraphQLSchema- Returns:
- a GraphQLFieldType enum that describes whether the field with the name @param fieldName of the GraphQL object type of the name @param objectTypeName is a scalar value or an object. If the parameter names provided doesn't correspond to an object type or a field for the endpoint return null.
-
getGraphQLFieldValueType
- Specified by:
getGraphQLFieldValueTypein interfaceGraphQLSchemafieldName- of the GraphQL object type with the name @param objectTypeName . If the parameter names provided doesn't correspond to an object type or a field for the endpoint return null.- Returns:
- the value type (String,Int,... etc.) for the field with the name
-
getGraphQLObjectTypes
- Specified by:
getGraphQLObjectTypesin interfaceGraphQLSchema- Returns:
- a set with the names of all the defined GraphQL object types for the endpoint.
-
getEntrypoint
- Specified by:
getEntrypointin interfaceGraphQLSchema- Returns:
- a GraphQLEntrypoint object containing information about a specific field in the GraphQL "query" type.
-
getGraphQLObjectFields
- Specified by:
getGraphQLObjectFieldsin interfaceGraphQLSchema- Returns:
- a map of field names for the GraphQL object type with the name @param objectTypeName mapped to their respective GraphQLField objects containing information about the field. If the parameter name provided doesn't correspond to an object type for the endpoint return null.
-
toString
-