public class GQLExecutor extends Object
| Constructor and Description |
|---|
GQLExecutor(GQLSchemaConfig schemaConfig,
GQLMetaModel metaModel,
IGQLErrorProcessor errorProcessor,
graphql.schema.DataFetcher<?> getByIdDataFetcher,
graphql.schema.DataFetcher<GQLListLoadResult> listDataFetcher,
graphql.schema.DataFetcher<?> saveDataFetcher,
graphql.schema.DataFetcher<GQLDeleteResult> deleteDataFetcher,
graphql.schema.DataFetcher<?> customMethodDataFetcher,
List<GQLPropertyDataFetcher<?>> propertyDataFetchers,
List<GQLExecutionContext> allPossibleExecutionContexts)
Initialize GraphQL executorManualMetaModel from given
GQLMetaModel with no callback |
GQLExecutor(GQLSchemaConfig schemaConfig,
GQLMetaModel metaModel,
IGQLErrorProcessor errorProcessor,
IGQLExecutorCallback callback,
graphql.schema.DataFetcher<?> getByIdDataFetcher,
graphql.schema.DataFetcher<GQLListLoadResult> listDataFetcher,
graphql.schema.DataFetcher<?> saveDataFetcher,
graphql.schema.DataFetcher<GQLDeleteResult> deleteDataFetcher,
graphql.schema.DataFetcher<?> customMethodDataFetcher,
List<GQLPropertyDataFetcher<?>> propertyDataFetchers,
List<GQLExecutionContext> allPossibleExecutionContexts)
Initialize GraphQL executorManualMetaModel from given
GQLMetaModel with a callback IGQLExecutorCallback |
| Modifier and Type | Method and Description |
|---|---|
GQLExecutionResult |
execute(GQLExecutionContext executionContext,
graphql.ExecutionInput executionInput)
Execute given
ExecutionInput |
GQLExecutionResult |
execute(GQLExecutionContext executionContext,
String requestString)
Wrapper for execution
|
GQLExecutionResult |
execute(GQLExecutionContext executionContext,
String requestString,
String operationName,
Object rootContext,
Map<String,Object> arguments)
Wrapper for execution
|
Set<GQLExecutionContext> |
getAllExecutionContexts() |
GQLExecutionContext |
getDefaultExecutionContext() |
IGQLErrorProcessor |
getErrorProcessor() |
graphql.GraphQL |
getGraphql() |
Optional<graphql.GraphQL> |
getGraphql(GQLExecutionContext executionContext)
Get graphQL executor for given context
|
GQLInternalMetaModel |
getMetaModel() |
graphql.schema.GraphQLSchema |
getSchema() |
Optional<graphql.schema.GraphQLSchema> |
getSchema(GQLExecutionContext executionContext)
Get schema for given context
|
protected GQLExecutionResult |
wrapResult(graphql.ExecutionResult executionResult)
Wrap result.
|
public GQLExecutor(GQLSchemaConfig schemaConfig, GQLMetaModel metaModel, IGQLErrorProcessor errorProcessor, graphql.schema.DataFetcher<?> getByIdDataFetcher, graphql.schema.DataFetcher<GQLListLoadResult> listDataFetcher, graphql.schema.DataFetcher<?> saveDataFetcher, graphql.schema.DataFetcher<GQLDeleteResult> deleteDataFetcher, graphql.schema.DataFetcher<?> customMethodDataFetcher, List<GQLPropertyDataFetcher<?>> propertyDataFetchers, List<GQLExecutionContext> allPossibleExecutionContexts)
GQLMetaModel with no callbackschemaConfig - the schema configuration GQLSchemaConfigmetaModel - the meta modelerrorProcessor - the IGQLErrorProcessorgetByIdDataFetcher - the DataFetcher for 'getById' methodslistDataFetcher - the DataFetcher for 'getAll' methodssaveDataFetcher - the DataFetcher for 'save' methodsdeleteDataFetcher - the DataFetcher for 'delete' methodscustomMethodDataFetcher - the DataFetcher for custom methodspropertyDataFetchers - custom GQLPropertyDataFetcher listallPossibleExecutionContexts - a list of all possible GQLExecutionContext. Leave it empty or null if youpublic GQLExecutor(GQLSchemaConfig schemaConfig, GQLMetaModel metaModel, IGQLErrorProcessor errorProcessor, IGQLExecutorCallback callback, graphql.schema.DataFetcher<?> getByIdDataFetcher, graphql.schema.DataFetcher<GQLListLoadResult> listDataFetcher, graphql.schema.DataFetcher<?> saveDataFetcher, graphql.schema.DataFetcher<GQLDeleteResult> deleteDataFetcher, graphql.schema.DataFetcher<?> customMethodDataFetcher, List<GQLPropertyDataFetcher<?>> propertyDataFetchers, List<GQLExecutionContext> allPossibleExecutionContexts)
GQLMetaModel with a callback IGQLExecutorCallbackschemaConfig - the schema configuration GQLSchemaConfigmetaModel - the meta modelerrorProcessor - the IGQLErrorProcessorcallback - the IGQLExecutorCallbackgetByIdDataFetcher - the DataFetcher for 'getById' methodslistDataFetcher - the DataFetcher for 'getAll' methodssaveDataFetcher - the DataFetcher for 'save' methodsdeleteDataFetcher - the DataFetcher for 'delete' methodscustomMethodDataFetcher - the DataFetcher for custom methodspropertyDataFetchers - custom GQLPropertyDataFetcher listallPossibleExecutionContexts - a list of all possible GQLExecutionContextpublic GQLExecutionResult execute(GQLExecutionContext executionContext, String requestString)
executionContext - the GQLExecutionContextrequestString - the request content as stringGQLExecutionResultpublic GQLExecutionResult execute(GQLExecutionContext executionContext, String requestString, String operationName, Object rootContext, Map<String,Object> arguments)
executionContext - the GQLExecutionContextrequestString - the request content as stringoperationName - the operation namerootContext - the execution root context objectarguments - the arguments MapGQLExecutionResultpublic GQLExecutionResult execute(GQLExecutionContext executionContext, graphql.ExecutionInput executionInput)
ExecutionInputexecutionContext - the GQLExecutionContextexecutionInput - the ExecutionInputGQLExecutionResultprotected GQLExecutionResult wrapResult(graphql.ExecutionResult executionResult)
executionResult - the ExecutionResultGQLExecutionResultpublic Optional<graphql.schema.GraphQLSchema> getSchema(GQLExecutionContext executionContext)
executionContext - the GQLExecutionContextGraphQLSchemapublic Optional<graphql.GraphQL> getGraphql(GQLExecutionContext executionContext)
executionContext - the GQLExecutionContextGraphQLpublic graphql.schema.GraphQLSchema getSchema()
GraphQLSchema for default GQLExecutionContextpublic graphql.GraphQL getGraphql()
GraphQL for default GQLExecutionContextpublic IGQLErrorProcessor getErrorProcessor()
public GQLInternalMetaModel getMetaModel()
public Set<GQLExecutionContext> getAllExecutionContexts()
public GQLExecutionContext getDefaultExecutionContext()
GQLExecutionContextCopyright © 2019–2020. All rights reserved.