oak-graphql
oak-graphql copied to clipboard
Get requested fields in resolver
Hi! Very nice module so far :)
I was wondering while trying to optimize my resolvers if there is a way to get the requested fields inside the resolver for a specific query?
For example, if the query is
{
movies {
title,
tags {
name
}
}
}
Is there a way to, in the resolver, get that the 'title' and 'tags' fields are the only requested ones?
Resolving 'tags' (or other certain fields) take longer than others, so it would be nice if I only had to resolve these if they are present in the query.