exogen/graphbrainz

__typename-rels is not a valid inc parameter for the artist resource.

martinbonnin opened this issue · 0 comments

The below query

query Artist {
  node(id: "QXJ0aXN0OjMyM2VkOTc0LThiZjYtNGY1NC05NTI1LWI3NzRhNjU5ZjgwNQ==") {
    ... on Artist {
      relationships {
        __typename
      }
    }
  }
}

when used on https://graphbrainz.herokuapp.com/ fails with

{
  "errors": [
    {
      "message": "__typename-rels is not a valid inc parameter for the artist resource.",
      "locations": [
        {
          "line": 4,
          "column": 7
        }
      ],
      "path": [
        "node",
        "relationships"
      ]
    }
  ],
  "data": {
    "node": {
      "relationships": null
    }
  }
}

The problem seems to come from the __typename meta-field that is not correctly understood: https://spec.graphql.org/draft/#sec-Type-Name-Introspection