vivo-community / scholars-discovery

BSD 3-Clause "New" or "Revised" License
2 stars 6 forks source link

Prune top-level GraphQL queries #174

Closed jimwood closed 4 years ago

jimwood commented 4 years ago

Proposal: Limit top-level queries to simplify interface. Ideally this would be 2 per type. For example:

person -> Currently personById, this would work the same way (find 1 person using their identifier) people -> Currently personFacetedSearch, this would change to implement defaults for any parameter not specified:

If that is not possible due to return types then people could be split into: personSearch (as above but query is required) personList (as above but no query parameter)

ghost commented 4 years ago

Simply remove @GraphQLQuery annotations from methods you do not want exposed as resolvers and change the names of the resolvers you would like. May have to remove the argument annotations as well. If the function is not an override it can be removed.

jimwood commented 4 years ago

Determine core set of top-level queries from options above based on return type limitations

Remove overriding of methods in grapqhl.service classes that won't be used as resolvers. Update graphql resolver names in the annotations.

bluedevelz commented 4 years ago

A pull request for an implementation that should satisfy the requirements has been created.