Class DefaultGraphQLInvocation
java.lang.Object
io.micronaut.configuration.graphql.DefaultGraphQLInvocation
- All Implemented Interfaces:
GraphQLInvocation
The default implementation for invoking GraphQL requests.
- Since:
- 1.0
- Author:
- Marcel Overdijk, Graeme Rocher, James Kleeh
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultGraphQLInvocation(graphql.GraphQL graphQL, GraphQLExecutionInputCustomizer graphQLExecutionInputCustomizer, @Nullable io.micronaut.context.BeanProvider<org.dataloader.DataLoaderRegistry> dataLoaderRegistry) Deprecated, for removal: This API element is subject to removal in a future version.DefaultGraphQLInvocation(io.micronaut.context.BeanContext beanContext, GraphQLExecutionInputCustomizer graphQLExecutionInputCustomizer, @Nullable io.micronaut.context.BeanProvider<org.dataloader.DataLoaderRegistry> dataLoaderRegistry) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<graphql.ExecutionResult> invoke(GraphQLInvocationData invocationData, io.micronaut.http.HttpRequest httpRequest, @Nullable io.micronaut.http.MutableHttpResponse<String> httpResponse) Invokes the GraphQL request and returns a publisher that emitsExecutionResultobjects.
-
Constructor Details
-
DefaultGraphQLInvocation
@Inject public DefaultGraphQLInvocation(io.micronaut.context.BeanContext beanContext, GraphQLExecutionInputCustomizer graphQLExecutionInputCustomizer, @Nullable io.micronaut.context.BeanProvider<org.dataloader.DataLoaderRegistry> dataLoaderRegistry) Default constructor.- Parameters:
beanContext- the bean context used to resolve the currentGraphQLbeangraphQLExecutionInputCustomizer- theGraphQLExecutionInputCustomizerinstancedataLoaderRegistry- theDataLoaderRegistryinstance
-
DefaultGraphQLInvocation
@Deprecated(forRemoval=true, since="5.1.0") public DefaultGraphQLInvocation(graphql.GraphQL graphQL, GraphQLExecutionInputCustomizer graphQLExecutionInputCustomizer, @Nullable io.micronaut.context.BeanProvider<org.dataloader.DataLoaderRegistry> dataLoaderRegistry) Deprecated, for removal: This API element is subject to removal in a future version.Compatibility constructor for direct instantiation.- Parameters:
graphQL- theGraphQLinstancegraphQLExecutionInputCustomizer- theGraphQLExecutionInputCustomizerinstancedataLoaderRegistry- theDataLoaderRegistryinstance
-
-
Method Details
-
invoke
public org.reactivestreams.Publisher<graphql.ExecutionResult> invoke(GraphQLInvocationData invocationData, io.micronaut.http.HttpRequest httpRequest, @Nullable io.micronaut.http.MutableHttpResponse<String> httpResponse) Invokes the GraphQL request and returns a publisher that emitsExecutionResultobjects.- Specified by:
invokein interfaceGraphQLInvocation- Parameters:
invocationData- the GraphQL invocation datahttpRequest- the HTTP requesthttpResponse- the mutable HTTP response, can be null when using websocket- Returns:
- the GraphQL execution result
-
DefaultGraphQLInvocation(io.micronaut.context.BeanContext,io.micronaut.configuration.graphql.GraphQLExecutionInputCustomizer,io.micronaut.context.@org.jspecify.annotations.Nullable BeanProvider<org.dataloader.DataLoaderRegistry>)instead.