Skip to content

Expand PropertyFetcher to invoke methods that have DataFetchingEnvironment as a parameters #1166

Closed

Description

@bbakerman

Imagine we have class like

class SomeDTO {

       public String getName(DataFetchingEnvironment env) {
             ....
     }
}

Today PropertyDataFetcher will look for POJO getName() methods (ie a getter that has the name prefix "get / is" and takes no args) but it wont call this method if it takes DataFetchingEnvironment as an argument

We should allow this. This allows a DTO object used as a Source to be more clever and reduces the need to put DataFetchers in ALL the places where you want to do more processing based on arguments.

This is how graphql-js works for example

Activity

  1. changed the title [-]Expand PropertyFetcher to invoke methods that have DataFetchingEvnvironment as a parameters[/-] [+]Expand PropertyFetcher to invoke methods that have DataFetchingEvvironment as a parameters[/+] on Aug 10, 2018
  2. changed the title [-]Expand PropertyFetcher to invoke methods that have DataFetchingEvvironment as a parameters[/-] [+]Expand PropertyFetcher to invoke methods that have DataFetchingEnvironment as a parameters[/+] on Aug 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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