Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error finding query implementation #36

Closed
stuarthendren opened this issue Oct 15, 2017 · 2 comments
Closed

Error finding query implementation #36

stuarthendren opened this issue Oct 15, 2017 · 2 comments

Comments

@stuarthendren
Copy link

In the following two examples, the first works as expected with different arguments missing, the second does not.

  @GraphQLQuery(name = "allEntities")
  public List<Entity> getEntities(
      @GraphQLArgument(name = "type", description = "The type of the entity") String type,
      @GraphQLArgument(name = "value", description = "A value of the entity") String value,
      @GraphQLArgument(name = "limit", defaultValue = "0") int limit) {
    return null; //todo
  }

  @GraphQLQuery(name = "entities")
  public List<Entity> getByDocumentAndType(@GraphQLContext Document document,
      @GraphQLArgument(name = "type", description = "The type of the entity") String type,
      @GraphQLArgument(name = "value", description = "A value of the entity") String value,
      @GraphQLArgument(name = "limit", defaultValue = "0") int limit) {
    return null; //todo

For example, the following query works fine:

{
  allEntities(type: "Person"){
     value
   }
}

but this one gives the exception below :

{
  documents {
    entities(type: "Person"){
      value
    }
  }
}
Caused by: graphql.GraphQLException: Resolver for operation entities accepting arguments: [limit, type] not implemented
	at io.leangen.graphql.execution.OperationExecutor.execute(OperationExecutor.java:56) ~[spqr-0.9.3.jar:na]
	... 63 common frames omitted
@kaqqao
Copy link
Member

kaqqao commented Oct 15, 2017

While it sounds unrelated, this is actually yet another manifestation of your other issue (with queries having to match on context arguments). I've been working on the proper fix for a while now and will push it soon (when I'm back from vacation).

@stuarthendren
Copy link
Author

Ah ok - I'll close this issue then and leave the other open. Thanks for your quick response while on vacation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants