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 ConversionServiceconversionService(@Nullable ConversionService service) Add aConversionServiceto apply type conversion to argument values where needed.create()Create an instance without any options set.booleanfallBackOnDirectFieldAccess(boolean fallBackOnDirectFieldAccess) Whether binding GraphQL arguments onto@Argumentshould falls back to direct field access in case the target object does not use accessor methods.@Nullable GraphQlArgumentBinder.NameResolverAdd a resolver to help to map GraphQL argument names to Object property names.
-
Method Details
-
conversionService
Add aConversionServiceto 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@Argumentshould 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.
-