You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ability to get parsed directive argument values inside a DataFetcher #1228
where @cache is a custom directive, I'd expect to be able to get the value (true) of the enabled argument in a fashion similar to how I can get the value of author.
Currently, it's only possible to get the non-parsed value:
For a scalar value (like here), it's not too hard to get the parsed value from Value, but it also means taking variables into account. Gets significantly more complicated for object values.
The only way to parse the values is by using ValuesResolver which is internal API.
So I propose an extension to the DataFetchingEnvironment, e.g. DataFetchingEnvironment#getDirectiveArguments(String) that would return the parsed values exactly the same DataFetchingEnvironment#getArguments does:
Activity
Ability to get parsed directive argument values inside a DataFetcher
bbakerman commentedon Oct 24, 2018
@kaqqao - this will help any efforts in regard to #1211 - eg better input validation.
Ability to get parsed directive argument values inside a DataFetcher
dondonz commentedon Nov 17, 2022
Closing this old issue as PRs have been merged