Skip to content

Support Map<K, V> as input argument type  #1808

Closed
@andreyTheGreatest

Description

@andreyTheGreatest

Is your feature request related to a problem? Please describe.
I have an input argument of Map<K, V> type for a subscription request. I map it to ExtendedScalars.JSON to avoid TypeNotSupportedException, however with a 6.x version of generator package I am getting PrimaryConstructorNotFound: Invalid input object Map - missing public primary constructor.
I have noticed related discussions about this problem in #1518 and #1520. But they suggest to create either a constructor, because of predefined POJO java classes usage, or a custom FunctionDataFetcher . Any Map implementation doesn't provide one constructor only, and creating custom support of a simple Map via FunctionDataFetcher seems like an overkill to me.

Describe the solution you'd like
I'd suggest Map support is as crucial as List support as an input argument. As far as I am concerned, List doesn't generate PrimaryConstructorNotFound, so maybe a similar behavior could be provided for the Map as well.

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