Passing array as argument in GraphQL
<p>I have started working on <a href="https://facebook.github.io/graphql/" rel="noreferrer">GraphQL</a>.My schema contains one list item too.</p>

<p>Following is the code of my schema:</p>

<pre><code>var userType = new graphql.GraphQLObjectType({  
 name: 'user',
 fields: function () {
  return {
    _id: {
    type: graphql.GraphQLID
  },
  name: {
    type: graphql.GraphQLString
  },
  age: {
    type: graphql.GraphQLString
  },
  degrees:[
  {type:graphql.GraphQLList}
  ]
}
  }
   });
</code></pre>

<p>AND the query is as follows:</p>

<pre><code>  var QueryType = new graphql.GraphQLObjectType({  
  name: 'Query',
  fields: () =&gt; ({
    userArr: {
      type: new graphql.GraphQLList(userType),
      args:{
         degrees:{type:new graphql.GraphQLList(userType)}
      },
     resolve: function(source, args) {
        console.log(args);
        resolve(args);
      }
    }
})
})
</code></pre>

<p>I got this error.
<a href="https://i.stack.imgur.com/bnr87.png" rel="noreferrer"><img src="https://i.stack.imgur.com/bnr87.png" alt="enter image description here"></a></p>

<p>Basically i need to post the array from client graphql query and have to define query accordingly which i am unable to achieve.
Any suggestions because i can't find any help over this issue..</p>