-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify how to use GraphQLValue
s in Arguments
#1077
Comments
@Denommus yup, this is somewhat non-symmetrical. The |
@tyranron besides manually calling resolve within |
@Denommus what do you mean by "check the type of an argument"? An argument is given as an |
@tyranron I mean GraphQL Type. |
@Denommus whether the type matches GraphQL schema is checked in a validation layer, before doing resolve. |
@tyranron ah, but that validation layer doesn't check dynamic enums, is that it? |
@Denommus yeah, it actually reuses I wonder whether we can specify Oh... one edge case is that default values are validated on schema creation, where no Also, another pain point maybe possible persisted queries in future. Where the query will be validated with one |
Currently, I'm generating a dynamic GraphQL enum from the database (hence, I need access to my
Context
andTypeInfo
), to be used as an input argument in one of my queries.But right now I'm manually calling resolve from within the resolve_field_async in order to see whether my argument actually is a valid value for that Enum.
That happens because
args.get
only usesFromInputValue
, it doesn't actually callresolve
. AndFromInputValue
doesn't have access toContext
andTypeInfo
.In conclusion, it would be useful if there would be a way of resolving
Arguments
, not only "get
ting" them.The text was updated successfully, but these errors were encountered: