haskell-graphql / graphql-api

Write type-safe GraphQL services in Haskell
BSD 3-Clause "New" or "Revised" License
406 stars 35 forks source link

Cannot distinguish between missing arguments and field not wanted #81

Closed jml closed 7 years ago

jml commented 7 years ago

As per #77

On the example schema, this query:

{
  name
  owner {
    name
  }
}

Returns:

{
  "data": {
    "dog": {
      "name": "Mortgage",
      "owner": null
    }
  },
  "errors": [
    {
      "message": "No value provided for Name {getNameText = \"dogCommand\"}, and no default specified."
    }
  ]
}

I would expect it to return:

{
  "data": {
    "dog": {
      "name": "Mortgage",
      "owner": {
        "name": "jml"
      }
    }
  }
}
jml commented 7 years ago

The issue isn't that nested queries are broken, it's that: