Description
Some people instead of batching and caching separate resolvers (#51) prefer to load all the data manually. So when they resolve the query, they parse the resolve info object to get a list/structure of fields to fetch from DB or API and then create specific query to DB/API.
Also it might be useful for selecting fields/columns from DB, e.g. when the GraphQL query requires only a single field but our database SQL query has to be universal so it has *
so it returns a lot of unnecessary data, like other 30 columns/fields.
It would be nice to have a decorator for that with nice integration with graphql-fields
. It should convert the returned object to a mongo-like convention (robrichard/graphql-fields#5) and have an ability to return array of keys in first level (without nesting) for sql queries optimization.
It should also take care about mapping the GraphQL field names (provided with { name: "fieldName" }
option) to the TS property names.