AEB-labs / graphql-weaver

A tool to combine, link and transform GraphQL schemas
MIT License
240 stars 20 forks source link

Implement "skip" argument for join fields #44

Closed Yogu closed 6 years ago

Yogu commented 6 years ago

Like "first", it is passed through to the original field if no filter / order of the right side is used.

Otherwise, in the general case, skipping and limiting are done in the weaver code (and thus the whole data sets need to be transferred from the origins).

There is one case where it can be optimized: If ordering by the right side, doing an inner join (filtering on the right side, may be an empty filter), and there are no multiple left objects that link to the same right object. In this case, the left side is still queried completely, but the right side gets the "skip" argument passed through. This case is can actually be pretty common in the process manager.

Fixes #41.