Generate query for Spring method with @GraphQLQuery

Generate query for Spring method with @GraphQLQuery


0

I have method:

   @GraphQLQuery(name = "events", description = "get all events")
   public List<String> getEvents() {
         return List.of("test", "test2");
    }

I need to create query for clients. below example not work:

query events{
  events{
    ... String
  }
}

what is wrong?

Share
Improve this question

1 Answer
1

Reset to default


0

You can also use this annotation – @QueryMapping

Share
Improve this answer



Not the answer you're looking for? Browse other questions tagged

or ask your own question.

Leave a Reply

Your email address will not be published. Required fields are marked *