Patch Changes
-
Resolve
Promise
references before calling__resolveType
on interface (#2556)Since the introduction of entity interfaces, users could not return
aPromise
from__resolveReference
while implementing a synchronous,
custom__resolveType
function. This change fixes/permits this use case.Additional background / implementation details:
Returning a
Promise
from__resolveReference
has historically never
been an issue. However, with the introduction of entity interfaces, the
calling of an interface's__resolveType
function became a new concern.__resolveType
functions expect a reference (and shouldn't be concerned
with whether those references are wrapped in aPromise
). In order to
address this, we canawait
the reference before calling the
__resolveType
(this handles both the non-Promise
andPromise
case). -
Updated dependencies [
f6a8c1ce
]:- @apollo/federation-internals@2.4.3