Class GraphQlContextAccessor
java.lang.Object
org.springframework.graphql.execution.GraphQlContextAccessor
- All Implemented Interfaces:
io.micrometer.context.ContextAccessor<GraphQLContext,
GraphQLContext>
public class GraphQlContextAccessor
extends Object
implements io.micrometer.context.ContextAccessor<GraphQLContext,GraphQLContext>
ContextAccessor
that enables support for reading and writing values
to and from a GraphQLContext
. This accessor is automatically
registered via ServiceLoader
.- Since:
- 1.1.0
- Author:
- Rossen Stoyanchev
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClass<? extends GraphQLContext>
<T> T
readValue
(GraphQLContext context, Object key) void
readValues
(GraphQLContext context, Predicate<Object> keyPredicate, Map<Object, Object> readValues) Class<? extends GraphQLContext>
writeValues
(Map<Object, Object> valuesToWrite, GraphQLContext targetContext)
-
Constructor Details
-
GraphQlContextAccessor
public GraphQlContextAccessor()
-
-
Method Details
-
readableType
- Specified by:
readableType
in interfaceio.micrometer.context.ContextAccessor<GraphQLContext,
GraphQLContext>
-
readValues
public void readValues(GraphQLContext context, Predicate<Object> keyPredicate, Map<Object, Object> readValues) - Specified by:
readValues
in interfaceio.micrometer.context.ContextAccessor<GraphQLContext,
GraphQLContext>
-
readValue
- Specified by:
readValue
in interfaceio.micrometer.context.ContextAccessor<GraphQLContext,
GraphQLContext>
-
writeableType
- Specified by:
writeableType
in interfaceio.micrometer.context.ContextAccessor<GraphQLContext,
GraphQLContext>
-
writeValues
- Specified by:
writeValues
in interfaceio.micrometer.context.ContextAccessor<GraphQLContext,
GraphQLContext>
-