In most example I saw there I need to implement a fletcher for each type I.e. having one generic query for each type. As one of the promises of GraohQL is reducing load on the server, I wonder how can I customize the query to the DB in a way it will fetch only the fields the user specify in the GraphQL query.
I know I can fetch all possible fields, but this looks to me like missing the point.
I don't know this specific java implementation but it will be similar to other solutions.
You have to use additional, contextual informations available to optimize DB queries. According to docs you're probably looking for DataFetchingEnvironment