steveluscher / zero-to-graphql

Examples of GraphQL endpoints created using various languages/frameworks.
412 stars 76 forks source link

Django example not working as expected #17

Open miriam-z opened 6 years ago

miriam-z commented 6 years ago

After cloning the project and starting with Django (version 2.1a1) and did have to modify

from django.core.urlresolvers import reverse

to

from django.urls import reverse

and added new entries in SQLite then

python manage.py migrate

But

./manage.py runserver

returns:

screen shot 2018-05-30 at 13 02 31

But the SQLite database is clearly present within IDE:

screen shot 2018-05-30 at 13 03 52

conradwt commented 6 years ago

@miriam-z I'll be pushing out fix/update later today after I have gone through the release notes for Django 2.1.

cpwr commented 6 years ago

@miriam-z but message says that your resolver function does not understand the id arg

when declaring fields you could try to set

person = graphene.Field(
        UserType,
        id=graphene.Int(),
    )

I believe that's gonna help