0
Would it be possible to somehow restrict some fields from being returned in a graph ql method, bur return them in another considering they both return the same object ?
For example in the following methods i would like to restrict the field UserDto.birthday from being able to be queried in the second method.
@GraphQLQuery(name = "getUser")
@PreAuthorize("hasAuthority('userRead')")
public UserDto getUser(@GraphQLArgument(name = "id") Long id)
and
@GraphQLQuery(name = "getAllUsers")
@PreAuthorize("hasAuthority('userSelect')")
public List<UserDto> getAllUsers()
I am using graphql-spqr-spring-boot-starter version 0.0.7 with Spring Boot 2.7.6
|