Skip to content

Vote Mutation error #64

@Baystef

Description

@Baystef

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"
      ]
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions