graphql.nadel.engine.execution.AsyncIsFieldForbidden Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nadel-engine Show documentation
Show all versions of nadel-engine Show documentation
Nadel is a Java library that combines multiple GrahpQL services together into one API.
The newest version!
package graphql.nadel.engine.execution;
import graphql.GraphQLError;
import graphql.language.Field;
import graphql.language.Node;
import graphql.nadel.engine.NadelContext;
import graphql.nadel.hooks.HydrationArguments;
import graphql.nadel.hooks.ServiceExecutionHooks;
import graphql.nadel.normalized.NormalizedQueryField;
import graphql.schema.GraphQLSchema;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import static graphql.introspection.Introspection.TypeNameMetaFieldDef;
import static graphql.nadel.dsl.NodeId.getId;
import static graphql.nadel.util.FpKit.flatMap;
import static graphql.nadel.util.FpKit.map;
public class AsyncIsFieldForbidden {
@NotNull
private final Map fieldsToErrors = new ConcurrentHashMap<>();
@NotNull
private final ServiceExecutionHooks serviceExecutionHooks;
@NotNull
private final NadelContext nadelContext;
@NotNull
private final GraphQLSchema graphQLSchema;
@NotNull
private final HydrationArguments hydrationArguments;
@NotNull
private final Map variables;
public AsyncIsFieldForbidden(
@NotNull ServiceExecutionHooks serviceExecutionHooks,
@NotNull NadelContext nadelContext,
@NotNull GraphQLSchema graphQLSchema,
@NotNull HydrationArguments hydrationArguments,
@NotNull Map variables
) {
this.serviceExecutionHooks = serviceExecutionHooks;
this.nadelContext = nadelContext;
this.graphQLSchema = graphQLSchema;
this.hydrationArguments = hydrationArguments;
this.variables = variables;
}
@NotNull
public CompletableFuture