Package se.l4.graphql.binding
Interface ContextValue<T>
- All Known Implementing Classes:
ContextValueImpl
public interface ContextValue<T>
Holder for values that are from the
GraphQLContext
. Can be used
if there is a need to be able to update the context value during evaluation.-
Method Details
-
isPresent
boolean isPresent()Get if the value is present.- Returns:
-
get
T get()Get the current value if it is present. Will throw an error if the value is not present.- Returns:
-
asOptional
Get this value as an optional.- Returns:
-
update
Update the value in the context.- Parameters:
value
-
-
clear
void clear()Clear the value.
-