lilo icon indicating copy to clipboard operation
lilo copied to clipboard

Support for linking types

Open ramveeru opened this issue 1 year ago • 2 comments

Thanks for the wonderful library.

Does lilo provides support for linking types from different sources as in Braid? if yes how? i couldnt find any example.

Source : https://bitbucket.org/atlassian/graphql-braid/src/master/

A link will connect a field of one data source to be resolved against another data source. This allows one data source to simply know about the unique identifier of an object, and another to know about its details, yet to the consumer, they see an integrated schema.

For example, let's assume there are two data sources: foo and bar. 'foo' has a type Foo that contains a 'bar' field that is a simple string identifier. The 'bar' data source contains all the information about the 'Bar' type. The user will just see a single schema, and be able to query both foo and bar data in one go:

query { foo { title bar { name } } }
Under the covers, Braid actually makes this query to foo:

query { foo { title bar } } and this query to bar:

query { bar(id:$barId) { name } }

ramveeru avatar Jul 25 '24 15:07 ramveeru

no it doesn't support unfortunately but we can consider to add.

firatkucuk avatar Jul 26 '24 15:07 firatkucuk

@firatkucuk It will be a lot helpful if we can have this feature. Any plans to implement it in the near future?

ramveeru avatar Aug 01 '24 14:08 ramveeru