sajmil
02/02/2018, 10:28 PMKJ
02/03/2018, 3:14 AMKJ
02/03/2018, 3:15 AMSaeris
02/03/2018, 3:39 AMSaeris
02/03/2018, 3:44 AMPost
type. It's simple enough to do an enum for Public
, Acquaintences
, Friends
. But the tricky part is implementing a Custom
filter, where I'd need a list of `User`s. Because there'd be an author: User!
field on the Post
already, if I had another field, say exclude: [User!]!
the relationship between the two types is now ambiguous, so I need to specify a relation name. But that also requires me to set that relation name on both types. I don't want to have another field on my User
type which would essentially be posts they can't see.Saeris
02/03/2018, 3:52 AMfullname
which would be computed from firstname
and lastname
, that I would need to write that type in two locations? Both in datamodel.graphql
and schema.graphql
? From the examples it looks like types that aren't defined in schema.graphql
are automatically merged from prisma.graphql
.Saeris
02/03/2018, 3:53 AM@virtual
directive? That would instruct Prisma to skip creating a column for that field and just include it in the generated schema. That would prevent the need to write a type definition multiple times.Saeris
02/03/2018, 3:56 AMjoin-monster
does something similar to this in that you can specify required columns from a database to be used in the resolver for a computed field. Example here: https://join-monster.readthedocs.io/en/latest/field-metadata/Mr.niko.la
02/03/2018, 6:40 AMMr.niko.la
02/03/2018, 6:41 AMMr.niko.la
02/03/2018, 6:41 AMoxyoxy88
02/03/2018, 7:38 AMqsys
02/03/2018, 9:44 AMqsys
02/03/2018, 9:53 AMkyriakosmichael
02/03/2018, 11:44 AMjamiehalvorson
02/03/2018, 12:18 PMAditya
02/03/2018, 2:11 PMAditya
02/03/2018, 2:11 PMnilan
02/03/2018, 2:12 PMAditya
02/03/2018, 2:12 PMnilan
02/03/2018, 4:24 PMtfiwm
02/03/2018, 4:41 PMAndrea
02/03/2018, 8:29 PMAndrea
02/03/2018, 8:29 PMmatthiasak
02/03/2018, 10:03 PMkenan.warren
02/04/2018, 1:26 AMkenan.warren
02/04/2018, 1:42 AMmatthewcheok
02/04/2018, 4:40 AMmark.james
02/04/2018, 5:16 AMTavo
02/04/2018, 8:20 AM