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

Method do_resolve_reject

graphene/utils/dataloader.py:103–115  ·  view source on GitHub ↗
(self, key, future)

Source from the content-addressed store, hash-verified

101 return future
102
103 def do_resolve_reject(self, key, future):
104 # Enqueue this Future to be dispatched.
105 self._queue.append(Loader(key=key, future=future))
106 # Determine if a dispatch of this queue should be scheduled.
107 # A single dispatch should be scheduled per queue at the time when the
108 # queue changes from "empty" to "full".
109 if len(self._queue) == 1:
110 if self.batch:
111 # If batching, schedule a task to dispatch the queue.
112 enqueue_post_future_job(self.loop, self)
113 else:
114 # Otherwise dispatch the (queue of one) immediately.
115 dispatch_queue(self) # pragma: no cover
116
117 def load_many(self, keys):
118 """

Callers 1

loadMethod · 0.95

Calls 2

enqueue_post_future_jobFunction · 0.85
dispatch_queueFunction · 0.85

Tested by

no test coverage detected