Skip to content

[generator] support directives using input object args #1917

Open
@dariuszkuc

Description

@dariuszkuc

Is your feature request related to a problem? Please describe.
Currently we only support primitive scalar/enums directive arguments (or list of those). . Since we are using annotations to apply directives, we are limited by JVM in what types can be used for annotations parameters.

While GraphQL spec allows directives to also use input objects as their args, we currently don't support it as it requires usage of a custom annotation which is an interface (which cannot be used to generate concrete input/output types). While it is possible to do it through the hooks, the process requires manually creating those custom type definitions. Directive generation process should be updated to support generating input objects from referenced annotations.

Describe the solution you'd like
Out-of-box support for generating directives that use input objects as their arguments (i.e. reference another annotation).

Describe alternatives you've considered
Its possible to do it through hooks but it is a manual process.

Additional context
See #1913

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions