0

I'm trying to send array of strings as a query to my springboot based server,but the following query does not work ExecutionResult execute = graphQLService.getGraphQL().execute("{my_func{my_var:[\"abc\"]}{my_var2}}"); here is my schema file

schema {
   query: Query
   mutation: Mutation
 }

type Query {
   my_func(
     my_var: [String]
        ) : [object]
 }

type object{
    my_var: String,
    my_var2: String,
 }

this is the error

Query failed to parse : '{my_func{my_var:["abc"}]}{my_var2}}' 

1 Answer 1

2

The syntax of your query is not correct . It should be :

{
  my_func (my_var:["abc"]) {
    my_var2
  }
}

You should use round brackets () instead of curly brackets {} for specifying the field argument in the query.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.