Class GraphQlArgumentBinder.Options
java.lang.Object
org.springframework.graphql.data.GraphQlArgumentBinder.Options
- Enclosing class:
GraphQlArgumentBinder
Container of configuration settings for
GraphQlArgumentBinder
.- Since:
- 2.0.0
- Author:
- Brian Clozel, Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescription@Nullable ConversionService
conversionService
(@Nullable ConversionService service) Add aConversionService
to apply type conversion to argument values where needed.create()
Create an instance without any options set.boolean
fallBackOnDirectFieldAccess
(boolean fallBackOnDirectFieldAccess) Whether binding GraphQL arguments onto@Argument
should falls back to direct field access in case the target object does not use accessor methods.@Nullable GraphQlArgumentBinder.NameResolver
Add a resolver to help to map GraphQL argument names to Object property names.
-
Method Details
-
conversionService
Add aConversionService
to apply type conversion to argument values where needed.- Parameters:
service
- the service to use
-
nameResolver
Add a resolver to help to map GraphQL argument names to Object property names.- Parameters:
resolver
- the resolver to add
-
fallBackOnDirectFieldAccess
public GraphQlArgumentBinder.Options fallBackOnDirectFieldAccess(boolean fallBackOnDirectFieldAccess) Whether binding GraphQL arguments onto@Argument
should falls back to direct field access in case the target object does not use accessor methods.- Parameters:
fallBackOnDirectFieldAccess
- whether to fall back on direct field access
-
conversionService
-
nameResolver
-
fallBackOnDirectFieldAccess
public boolean fallBackOnDirectFieldAccess() -
create
Create an instance without any options set.
-