import graphene class ModuleInterface(graphene.Interface): pk = graphene.Int() def resolve_pk(self, info, **kwargs): return self.id