mbrochh/django-graphql-apollo-react-demo

update to code to resolve object pk's properly

Opened this issue · 0 comments

something like this:

class ProductSizeType(DjangoObjectType):
    class Meta:
        model = models.ProductSize
        interfaces = (graphene.Node, )
        local_fields = {
            'pk': graphene.Field(graphene.Int),
        }

    def resolve_pk(self, args, context, info):
        return self.pk