friatech / lilo

Lilo is a super-fast, easy-to-use, configurable GraphQL stitching library
Apache License 2.0
38 stars 3 forks source link

Support for linking types #33

Open ramveeru opened 4 months ago

ramveeru commented 4 months ago

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 } }

firatkucuk commented 4 months ago

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

ramveeru commented 4 months ago

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