Skip to content

DataFetcher arguments not supported for methods #85

@danielocampo2

Description

@danielocampo2

Recently, in the latest version, it has been added support to pass string arguments in the DataFetcher constructor (#44).
Thanks to @bmsantos for that.
However, this only supports such args when the DataFetcher is declared in a field and not for method declarations.
E.g. the following is not supported:

@GraphQLField
@GraphQLDataFetcher(value = CustomDataFetcher.class, args = { "Argument" })
private List<AnObject> getTheObjects(@GraphQLName("param") String aParameter);

This can be particularly limiting when you need parameters, as in the example.

It does not seem very difficult to extend the support for methods, so I will be trying to implement this capability probably next week. But would like to see if anyone has any advice on it.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions