graphql-python / swapi-graphene

GraphQL Starwars API using Graphene and Django

Home Page:http://swapi.graphene-python.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demo does not working

kiennt opened this issue · comments

I tried demo with this query

{
  allFilms() {
    edges {
      node {
        id
      }
    } 
  }
}

But I got error

{
  "errors": [
    {
      "message": "type object 'Film' has no attribute 'get_object_type'",
      "locations": [
        {
          "line": 16,
          "column": 3
        }
      ]
    }
  ],
  "data": {
    "allFilms": null
  }
}

Hi @kiennt!
Thanks for pointing this out. This was caused by a problem in graphene package, that was solved by this commit: graphql-python/graphene@266dd5e

The example will upgrade soon to graphene v0.4.0.1 that have a fix for that.

This is now fixed.
You can query:

{
  allFilms {
    edges {
      node {
        id
      }
    } 
  }
}