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

Vote Mutation error #64

Open
Baystef opened this issue Jun 25, 2019 · 0 comments
Open

Vote Mutation error #64

Baystef opened this issue Jun 25, 2019 · 0 comments

Comments

@Baystef
Copy link

Baystef commented Jun 25, 2019

I tried running the mutation.Vote query in the graphQL playground, but I keep getting an error, My code looks exactly the same as the one on the repo.
Here is my graphQL query

mutation {
    vote(linkId: "cjx6dqv0qpywy0b51522a0bju") {
         link {
             id 
             url
             description
          }
          user { 
              name
               email
          }
     }
}

But I keep getting these error below

{
  "data": {
    "vote": null
  },
  "errors": [
    {
      "message": "Variable '$data' expected value of type 'VoteCreateInput!' but got: {\"user\":{\"connect\":{\"id\":\"cjx6dnszyemtp0b611ur27uqz\"}},\"link\":{\"connect\":{\"id\":\"cjx6dqv0qpywy0b5152za0bju\"}}}. Reason: 'Link' Expected non-null value, found null. (line 1, column 11):\nmutation ($data: VoteCreateInput!) {\n          ^",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "vote"
      ]
    }
  ]
}
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

1 participant