MCPcopy Create free account
hub / github.com/graphql-python/graphene-django / article_batch_load_fn

Function article_batch_load_fn

graphene_django/tests/test_query.py:873–880  ·  view source on GitHub ↗
(keys)

Source from the content-addressed store, hash-verified

871 from promise.dataloader import DataLoader
872
873 def article_batch_load_fn(keys):
874 queryset = Article.objects.filter(reporter_id__in=keys)
875 return Promise.resolve(
876 [
877 [article for article in queryset if article.reporter_id == id]
878 for id in keys
879 ]
880 )
881
882 article_loader = DataLoader(article_batch_load_fn)
883

Callers

nothing calls this directly

Calls 2

resolveMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…