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

Example query returns an error in GraphiQL #6

Open
willowell opened this issue Dec 27, 2020 · 0 comments
Open

Example query returns an error in GraphiQL #6

willowell opened this issue Dec 27, 2020 · 0 comments

Comments

@willowell
Copy link

Hello!

I just cloned the repository, but the example query in the README is returning an error in GraphiQL.

To build the server, I:

  1. cloned the repository,
  2. ran stack build inside the repository,
  3. ran npm install inside the repository,
  4. and finally ran npm start.

The query in question is:

query GetDeity {
  deity(name: "Morpheus") {
    name
    power
  }
}

which returns

{
  "errors": [
    {
      "message": "Failure on Resolving Field \"deity\": DB Error: could not find entry for ID \"Morpheus\"",
      "locations": [
        {
          "line": 2,
          "column": 27
        }
      ]
    }
  ]
}

The other endpoint is fine, that is:

query GetDeity {
  deities {
    name
    power
  }
}

returns

{
  "data": {
    "deities": [
      {
        "name": "Morpheus",
        "power": "Shape shifting"
      },
      {
        "name": "Poseidon",
        "power": "Storm"
      },
      {
        "name": "Zeus",
        "power": "thunder"
      }
    ]
  }
}

Any idea what's going on here? Did I miss something setting up the server? If there's any info I can give that may help, just let me know!

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