Fork me on GitHub

Hello all, how do I use relationship one-to-many? Is it in object or query?

Lennart Buit08:04:30

I don’t fully understand the question. In lacinia, you can just mark a field as having type (list :Thing), then you can just return a list from your resolver


but how do you make the relationship one to many in resolver?


like if you have relationship product -> items

Lennart Buit12:04:08

You just return a list of things. So say that you have a type Product { }, that has a field Product#items, which has type (list :Item), you can create a resolver that returns that list of items


Lennart, but the resolver is formatted like what?