Skip to content

Support for linking types #33

@ramveeru

Description

@ramveeru

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions