Search in sources :

Example 1 with GraphQLUnmodifiedType

use of graphql.schema.GraphQLUnmodifiedType in project graphql-java by graphql-java.

the class TraversalContext method enterImpl.

private void enterImpl(ObjectField objectField) {
    GraphQLUnmodifiedType objectType = schemaUtil.getUnmodifiedType(getInputType());
    GraphQLInputType inputType = null;
    if (objectType instanceof GraphQLInputObjectType) {
        GraphQLInputObjectType inputObjectType = (GraphQLInputObjectType) objectType;
        GraphQLInputObjectField inputField = schema.getFieldVisibility().getFieldDefinition(inputObjectType, objectField.getName());
        if (inputField != null)
            inputType = inputField.getType();
    }
    addInputType(inputType);
}
Also used : GraphQLInputType(graphql.schema.GraphQLInputType) GraphQLUnmodifiedType(graphql.schema.GraphQLUnmodifiedType) GraphQLInputObjectField(graphql.schema.GraphQLInputObjectField) GraphQLInputObjectType(graphql.schema.GraphQLInputObjectType)

Example 2 with GraphQLUnmodifiedType

use of graphql.schema.GraphQLUnmodifiedType in project graphql-java by graphql-java.

the class TraversalContext method enterImpl.

private void enterImpl(SelectionSet selectionSet) {
    GraphQLUnmodifiedType rawType = new SchemaUtil().getUnmodifiedType(getOutputType());
    GraphQLCompositeType parentType = null;
    if (rawType instanceof GraphQLCompositeType) {
        parentType = (GraphQLCompositeType) rawType;
    }
    addParentType(parentType);
}
Also used : GraphQLUnmodifiedType(graphql.schema.GraphQLUnmodifiedType) SchemaUtil(graphql.schema.SchemaUtil) GraphQLCompositeType(graphql.schema.GraphQLCompositeType)

Aggregations

GraphQLUnmodifiedType (graphql.schema.GraphQLUnmodifiedType)2 GraphQLCompositeType (graphql.schema.GraphQLCompositeType)1 GraphQLInputObjectField (graphql.schema.GraphQLInputObjectField)1 GraphQLInputObjectType (graphql.schema.GraphQLInputObjectType)1 GraphQLInputType (graphql.schema.GraphQLInputType)1 SchemaUtil (graphql.schema.SchemaUtil)1