Annotation Interface ContextValue
Annotation to bind a method parameter to an attribute from the
main
GraphQLContext
.
To bind to an attribute from the local context instead, see
@LocalContextValue
.
- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
-
Optional Element Summary
-
Element Details
-
value
Alias forname()
.- Default:
- ""
-
name
The name of the value to bind to.- Default:
- ""
-
required
boolean requiredWhether the value is required.Defaults to "true", leading to an exception thrown if the value is missing. Switch to "false" if you prefer
null
if the value is not present, or useOptional
.- Default:
- true
-