Corjen
12/13/2018, 9:21 AMsiyfion
12/13/2018, 10:41 AMCorjen
12/13/2018, 11:06 AMCorjen
12/13/2018, 11:06 AMWhile this approach enables querying for Post documents directly in the Prisma API (as opposed to embedded types which can only be queried through nested operations via their parent types), there are performance considerations when modeling relations this way.
Operations that go from a Post to a User via the author field will be more expensive. This is because the underlying Post objects don't know who their authors are and Prisma needs to filter all Users to find who the author of Post is.
siyfion
12/13/2018, 11:07 AMCorjen
12/13/2018, 11:09 AMsiyfion
12/13/2018, 11:10 AMsiyfion
12/13/2018, 11:12 AMCorjen
12/13/2018, 11:14 AMCorjen
12/13/2018, 11:19 AMsiyfion
12/13/2018, 11:26 AMsiyfion
12/13/2018, 11:26 AMsiyfion
12/13/2018, 11:27 AMCorjen
12/13/2018, 12:40 PMlawjolla
12/13/2018, 2:47 PM