4 ms·
I was psyched to hear about GraphQL, but when I looked at it and found no apparent way to do joins... I wondered what the big deal is.
by NonNefarious 4y ago
I was psyched to hear about GraphQL, but when I looked at it and found no apparent way to do joins... I wondered what the big deal is.
- vlod 4y agoI think the general idea is that it's a graph rather than relations. You "join" by using the parent ID (e.g. employerID of parent container to get employees). This can (and often) introduces an n+1 problem unless you watch for it and use dataloaders. Not saying this is great or anything. :)
- NonNefarious 4y agoThanks. The issue is what if I want to pull all the employees from the table of all customers, to determine how many employees have made purchases under our employee-discount plan? I just made that up as something that would likely require a join without really thinking it through too much...