0

I am using the IMDb API, and attempting to extract info using a GraphQL query. I wish to extract info for multiple actors using this query:

{
  names(ids: ["nm0000158", "nm0000226", "nm0000138"]) {
    id
    Name
    birthDate
  }
}

When I run this query in the IMDb GraphQL playground I get this message:

"errors": [
    {
      "message": "Cannot query field \"Name\" on type \"Name\".",
      "locations": [
        {
          "line": 4,
          "column": 5
        }
      ],
      "extensions": {
        "code": "GRAPHQL_VALIDATION_FAILED"
      }
    },
    {
      "message": "Cannot query field \"birthDate\" on type \"Name\".",
      "locations": [
        {
          "line": 5,
          "column": 5
        }
      ],
      "extensions": {
        "code": "GRAPHQL_VALIDATION_FAILED"
      }
    }
  ],
  "data": null
} 

Please share any suggestions or ideas. Thanks.

1 Answer 1

0

Fields you can query must match the fields service has defined, check out valid fields here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.