is there a way to retrieve the list of the fields were requested in a GraphQL query by a client?
Lets assume I have the following types:
type Book {
isbn: String
title: String
genre: String
author: Author
}
type Author {
name: String
surname: String
age: Int
}
Is there a way on Java side inside a method annotated with @GraphQLQuery to know the fields were requested by the client?
For example, having the following queries:
query {
book ( isbn = "12345" ) {
title
genre
}
}
query {
book ( isbn = "12345" ) {
title
author {
name
surname
}
}
}
I can know the first query requested the fields title and genre of Book and the second required title from Book and also name and surname of the Author ?
Thanks Massimo