5 ms·
Only if each field required loading a new row, and even then batching can be used to turn this back into one query. eg: { firstName, lastName } doesn't need to
by leebyron 11y ago
Only if each field required loading a new row, and even then batching can be used to turn this back into one query.
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 https://github.com/facebook/dataloader) is a small utility which makes batching and caching database requests straight forward.