Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for linking types #33

Open
ramveeru opened this issue Jul 25, 2024 · 2 comments
Open

Support for linking types #33

ramveeru opened this issue Jul 25, 2024 · 2 comments

Comments

@ramveeru
Copy link

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
Copy link
Collaborator

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

@ramveeru
Copy link
Author

ramveeru commented Aug 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants