https://github.com/graphql/graphql-js
Just implement resolve.
Just implement resolve.
eg: { firstName, lastName } doesn't need to load new rows but { mother { name }, father { name } } does need to load new rows.
DataLoader (https://github.com/facebook/dataloader) is a small utility which makes batching and caching database requests straight forward.
If the JavaScript implementation doesn't have something like this, perhaps it can be hacked on top.
query User {
friends {
friends {
friends {
...
}
}
}
}
how do you prevent something like this happening on graphQL backed with a series of resolves that query a SQL database?