Closed
Description
I can't seem to get select_related
to be honored at all, in my experience. Can anyone help me identify how it should work?
Job
has a foreign keys to Push
and to FailureClassification
models.
Here's my Graphene Schema:
class PushGraph(DjangoObjectType):
class Meta:
model = Push
filter_fields = ('revision', )
interfaces = (graphene.relay.Node, )
jobs = DjangoFilterConnectionField(JobGraph)
def resolve_jobs(self, args, context, info):
return (Job.objects
.filter(push=self, **args)
.select_related("failure_classification")
)
This seems to have no effect on doing a join in the queries. I get tons of repeat queries for each Job
that's returned. Is this a bug? Or a result of using DjangoFilterConnectionField
? as mentioned in Issue 179?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels