2👍
✅
This is a bug in graphene-django. It was fixed in version 1.3.
Changelog
Regards.
0👍
I’m not sure if the same person asked the question on graphene github page, but it looks almost, if not exactly the same. Apart from the fact mentioned bug existed, you still need some improvement in your code.
In order to make it work as you described (getting only related JobDetail
for each Job
) you have to define a resolver inside JobNode
:
def resolve_job_details(self, args, context, info):
return JobDetail.objects.filter(job=self, **args)
Of course you need also Job
resolver inside PushNode
:
def resolve_jobs(self, args, context, info):
return Job.objects.filter(push=self, **args)
👤Jacu
- [Answered ]-Why is stylesheet only working for the index page, but not for any extensions of the index page? (templates using Jinja)
- [Answered ]-Javascript event that triggers python script
- [Answered ]-How to separate a database from a Django web-app when going live?
- [Answered ]-GUI in web (Django) for Python script
Source:stackexchange.com