You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However there are a few issues:
While there is some code that expects the list boundary lookup, the validator complains about the signature incorrectly. Seems like it also expects the return type signature to be [Foo!] instead of [Foo!]!.
In some cases it then fails to merge the fields onto the object from another service.
There are some example services on the federation-id-deduplication branch. toomanyfoos exposes some lookup fields to get a list of Foo objects. zoot adds some fields to the Foo object.
Run with:
PORT=8091 go run ./examples/toomanyfoos/ &
PORT=8092 go run ./examples/zoot/ &
BRAMBLE_SERVICE_LIST="http://localhost:8091/query http://localhost:8092/query" go run ./cmd/bramble
Once this is working it would also be good if bramble could deduplicate the ids it looks up on the second service if the set is not unique, reducing the number of looks sent downstream. i.e. TooManyFoos returns a list of 20 items but there are only 10 unique items, this should cause either 10 foo lookups on zoot instead of 20, or a lookup of id ids on foos if the bulk boundary resolver is present.
The text was updated successfully, but these errors were encountered:
FWIW, the signature for boundary array queries would best use [Foo]! as the return type. We should always assume that a collection will be returned, but it may contain null positions when mapping IDs to potentially missing records. Using not-null for list items will corrupt the entire results set in response to a single record-not-found.
Currently undocumented is the ability to use a
@boundary
resolver that looks up a list of objects instead of a single object, i.e.instead of
However there are a few issues:
While there is some code that expects the list boundary lookup, the validator complains about the signature incorrectly. Seems like it also expects the return type signature to be
[Foo!]
instead of[Foo!]!
.In some cases it then fails to merge the fields onto the object from another service.
There are some example services on the federation-id-deduplication branch.
toomanyfoos
exposes some lookup fields to get a list ofFoo
objects.zoot
adds some fields to theFoo
object.Run with:
With the
foos
resolver present inzoot
the query:returns
with the ID list resolver removed it returns the correct:
Once this is working it would also be good if bramble could deduplicate the ids it looks up on the second service if the set is not unique, reducing the number of looks sent downstream. i.e.
TooManyFoos
returns a list of 20 items but there are only 10 unique items, this should cause either 10foo
lookups onzoot
instead of 20, or a lookup of id ids onfoos
if the bulk boundary resolver is present.The text was updated successfully, but these errors were encountered: