You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.
Hey @stephen-dahl we've recently added better relationship type support in v1.0.x. For your example, try
type Cart {
items: [CartItems]
}
type Item {
name: String!
description: String!
price: Float!
}
type CartItems @relation(name:"HAS_ITEM") {
from: Cart
to: Item
quantity: Int!
}
If you contruct your schema using makeAugmentedSchema (or augmentSchema) you'll see autogenerated Query and Mutation types for basic CRUD. In your case to access quantity your GraphQL query would look something like:
given the schema
(Cart) --[hasItem]->(Item)
how would you get the
quantity
property from the relationhasItem
?The text was updated successfully, but these errors were encountered: