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

Todo Example Error — parent type mismatch #483

Closed
Bonjour123 opened this issue Dec 26, 2018 · 0 comments
Closed

Todo Example Error — parent type mismatch #483

Bonjour123 opened this issue Dec 26, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@Bonjour123
Copy link

I just started the graphQL server of the TODO example, as notified in the READ.ME. I might miss something, but for me:

Expected Behaviour

  mutation {
    createTodo(todo: { text: "Fery important", done:true }) {
      id
      text
      done
    }
  }

should return

{
  "data": {
      "createTodo": {
        "id": 31,
        "text": "Fery important",
        "done":true
      }
    }
  }

Actual Behavior

returns the following error:

  {
    "errors": [
      {
        "message": "parent type mismatch",
        "path": [
          "createTodo",
          "done"
        ]
      }
    ],
    "data": null
  }

Minimal graphql.schema and models to reproduce

Didn't changed anything in any file.

Note:

  mutation {
    createTodo(todo: { text: "Fery important", done:true }) {
      id
      text
    }
  }

returns well :

{
  "data": {
      "createTodo": {
        "id": 31,
        "text": "Fery important"
      }
    }
  }
@mathewbyrne mathewbyrne added the bug Something isn't working label Jan 22, 2019
@mathewbyrne mathewbyrne changed the title getting "done" value of a freshly created todo Todo Example e Jan 22, 2019
@mathewbyrne mathewbyrne changed the title Todo Example e Todo Example Error — parent type mismatch Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants