I have the following mutation, it creates a reference fromt the User document back to the Decor Document, I want it the other way around, I want the Decord document to have a reference called owner to the user so that I can run the query below
mutation{
createDecor(data:{
description:"Plates"
pieces:2,
purchaser:"riel"
alterations:true
cost:20
purchaseDate:"2021-03-11"
category:"good"
owner:{connect:"292780547368813064"}
}){
description
}
}
right now this returns null for decor, because it has no reference back to the User, but the user has a reference to it which is not what i want because there are many decors per user.
query{
findUserByID(id:"292780547368813064"){
email
catalog{
clothing
}
decor{
alterations
}
}
}