Package graphql.normalized.nf
Class NormalizedOperationToAstCompiler
- java.lang.Object
-
- graphql.normalized.nf.NormalizedOperationToAstCompiler
-
@ExperimentalApi public class NormalizedOperationToAstCompiler extends java.lang.Object
This class can take a list ofNormalizedField
s and compiling out a normalised operationDocument
that would represent how those fields may be executed.This is essentially the reverse of
NormalizedDocumentFactory
which takes operation text and makesNormalizedField
s from it, this takesNormalizedField
s and makes operation text from it.You could for example send that operation text onto to some other graphql server if it has the same schema as the one provided.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NormalizedOperationToAstCompiler.CompilerResult
The result is aDocument
and a map of variables that would go with that document.
-
Constructor Summary
Constructors Constructor Description NormalizedOperationToAstCompiler()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NormalizedOperationToAstCompiler.CompilerResult
compileToDocument(GraphQLSchema schema, NormalizedOperation normalizedOperation)
static NormalizedOperationToAstCompiler.CompilerResult
compileToDocument(GraphQLSchema graphQLSchema, GraphQLObjectType rootType, NormalizedField singleRootField, @Nullable java.lang.String operationName, OperationDefinition.Operation operationKind)
static NormalizedOperationToAstCompiler.CompilerResult
compileToDocument(GraphQLSchema graphQLSchema, GraphQLObjectType rootType, java.util.List<NormalizedField> rootFields, @Nullable java.lang.String operationName, OperationDefinition.Operation operationKind)
-
-
-
Method Detail
-
compileToDocument
public static NormalizedOperationToAstCompiler.CompilerResult compileToDocument(GraphQLSchema graphQLSchema, GraphQLObjectType rootType, java.util.List<NormalizedField> rootFields, @Nullable java.lang.String operationName, OperationDefinition.Operation operationKind)
-
compileToDocument
public static NormalizedOperationToAstCompiler.CompilerResult compileToDocument(GraphQLSchema graphQLSchema, GraphQLObjectType rootType, NormalizedField singleRootField, @Nullable java.lang.String operationName, OperationDefinition.Operation operationKind)
-
compileToDocument
public static NormalizedOperationToAstCompiler.CompilerResult compileToDocument(GraphQLSchema schema, NormalizedOperation normalizedOperation)
-
-