Skip to content

Clarify how to use GraphQLValues in Arguments #1077

Open
@Denommus

Description

@Denommus

Currently, I'm generating a dynamic GraphQL enum from the database (hence, I need access to my Context and TypeInfo), 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 uses FromInputValue, it doesn't actually call resolve. And FromInputValue doesn't have access to Context and TypeInfo.

In conclusion, it would be useful if there would be a way of resolving Arguments, not only "getting" them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement of existing features or bugfix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions