Grant
07/10/2018, 1:03 PMconst item = await ctx.db.query.item({
where: { product: { id: productId } }
});
I get the error Reason: 'product' Field 'product' is not defined in the input type 'ItemWhereUniqueInput'.
Is there some way to have relations included in ItemWhereUniqueInput
?
This currently looks like:
type ItemWhereUniqueInput {
id: ID
}
medelman
07/10/2018, 1:31 PMGrant
07/10/2018, 1:34 PMtype Product { items: [Item!]! }
medelman
07/10/2018, 1:35 PMGrant
07/10/2018, 1:36 PMGrant
07/10/2018, 1:36 PMnilan
07/10/2018, 1:37 PMdb.query.items
instead of db.query.item
nilan
07/10/2018, 1:37 PMitem
only offers unique where selectorsmedelman
07/10/2018, 1:37 PMnilan
07/10/2018, 1:37 PMid: ID! @unique
Grant
07/10/2018, 1:37 PMItemWhereInput
nilan
07/10/2018, 1:38 PMnilan
07/10/2018, 1:38 PM[Item!]!
nilan
07/10/2018, 1:38 PMItem
Grant
07/10/2018, 1:38 PMmedelman
07/10/2018, 1:38 PMnilan
07/10/2018, 1:39 PMnilan
07/10/2018, 1:39 PMmedelman
07/10/2018, 1:39 PMnilan
07/10/2018, 1:40 PM