All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jacobmountain.graphql.client.query.QueryContext Maven / Gradle / Ivy

package com.jacobmountain.graphql.client.query;

import graphql.language.FieldDefinition;
import lombok.AllArgsConstructor;
import lombok.Value;

import java.util.HashSet;
import java.util.Set;

@Value
@AllArgsConstructor
public class QueryContext {

    int depth;

    FieldDefinition fieldDefinition;

    Set params;

    Set visited;

    QueryContext increment() {
        return new QueryContext(depth + 1, fieldDefinition, params, new HashSet<>());
    }

    QueryContext withType(FieldDefinition fieldDefinition) {
        return new QueryContext(depth, fieldDefinition, params, visited);
    }

    QueryContext withVisited(Set visited) {
        return new QueryContext(depth, fieldDefinition, params, visited);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy