P_loringhoven
01/02/2018, 4:16 PMmatic
01/02/2018, 4:47 PMJR Leonard
01/02/2018, 4:52 PMtype User {
id: ID! @unique
writtenStories: [Story!]! @relation(name: "WrittenStories")
likedStories: [Story!]! @relation(name: "LikedStories")
}
type Story {
id: ID! @unique
text: String!
author: User! @relation(name: "WrittenStories")
likedBy: [User!]! @relation(name: "LikedStories")
}
If the name wasn’t provided in this case, there would be now way for Graphcool to know whether writtenStories should relate to the author or the likedBy field.P_loringhoven
01/02/2018, 4:53 PMJR Leonard
01/02/2018, 4:54 PMname
argument of the @relation
direction*” sectionP_loringhoven
01/02/2018, 4:56 PMJR Leonard
01/02/2018, 4:57 PMP_loringhoven
01/02/2018, 5:00 PMP_loringhoven
01/02/2018, 5:00 PMmatic
01/02/2018, 5:25 PMP_loringhoven
01/02/2018, 5:40 PMJR Leonard
01/03/2018, 4:11 AM