Butch
12/12/2017, 8:57 PMtype User @model {
id: ID! @isUnique
email: String
firstName: String
lastName: String
posts: [Post!]! @relation(name: "PostOwner")
createdAt: DateTime!
updatedAt: DateTime!
}
type Post @model {
id: ID! @isUnique
title: String!
contents: String!
owner: [User!]! @relation(name: "PostOwner")
createdAt: DateTime!
updatedAt: DateTime!
}
Do I have to manually set the owner when creating a post?iamclaytonray
12/12/2017, 9:02 PMmutation { ... userId: "iweiwdgw4u73g3hg" }
Butch
12/12/2017, 9:03 PM