I have the following GraphQL Schema, which creates a one to one relationship between User and Decor.
type Catalog {
decor: Boolean
clothing: Boolean
supplies: Boolean
furniture: Boolean
owner: User
}
type Decor {
description: String!
pieces: Int!
purchaser: String!
alterations: Boolean!
cost: Int!
purchaseDate: Date!
category: String!
owner: User
}
type User {
email: String! @unique
catalog: Catalog
decor: Decor
}
If I have the following create lambda priviledge for the decor collection in a autehticated user that is in the membership for this role
Lambda("values", Equals(Identity(), Select(["data", "owner"], Var("values"))))
I am testing the mutation in graphQL and I get a permission denied error when using the token associated with that user.
mutation{
createDecor(data:{
description:"Plates"
pieces:2,
purchaser:"riel"
alterations:true
cost:20
purchaseDate:"2021-03-11"
category:"good"
owner:{connect:"292780547368813064"}
}){
description
}
}
Any ideas what I may be doing wrong here.