13

I am using apollo express server 2.0. And I am trying to execute mutation in the graphql playground. Here is the mutation I have attached a screenshot with another screenshot of a variable.

Mutation Command to create new user Mutation variables

I am getting the following error when I am trying to execute mutation command in the graphql playground.

enter image description here

Please guide me where I am incorrect.

Piyush Bansal
  • 1,635
  • 4
  • 16
  • 39
  • 1
    Remove the id in the mutation or add it in the vars. Also, remove the mname in your input. GraphQL error messages all mean the same thing - "Something is wrong, good luck!" You may have to change your resolver param also but you didn't post the resolver, which should always be done with GraphQL. I've seen that message many times... – Preston Jul 10 '19 at 16:00

2 Answers2

19

There are two tabs QUERY VARIABLES and HTTP HEADERS in the input field at the bottom right of graphQL Playground. Please check the tab QUERY VARIABLES is selected.

cuspymd
  • 1,048
  • 9
  • 13
-1

Seems you have to define each of the input fields separately.

toonday
  • 501
  • 4
  • 13