Skip to content
This repository has been archived by the owner on Nov 16, 2018. It is now read-only.

update to code to resolve object pk's properly #5

Open
mbrochh opened this issue Jul 7, 2017 · 0 comments
Open

update to code to resolve object pk's properly #5

mbrochh opened this issue Jul 7, 2017 · 0 comments

Comments

@mbrochh
Copy link
Owner

mbrochh commented Jul 7, 2017

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


Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant