You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for 1), this does not work when the entity is being referenced by other entities (prisma references etc), resulting in
"Error: Schema must contain uniquely named types but contains multiple types named "X"."
for 2), this actually adds massive latency overhead to larger queries (10000 records) screenshotted traces below. the additional overhead comes from nests/apollo, but as the field is already fetched form the db, we should be talking about latencies in μs.
nestjs does not support graphql "extend" directive, so thats not an option either, i guess the only workaround here is to make a separate "ExtendedEntity extends Entity" and query that instead, but that "duplicates" the schema.
My use-case, is that i am "extending" an entity and adding fields to it, and joining them in a raw-query, the fields are already present, but having to add "Resolvefield" fields adds additional 2 seconds to the request.
I think this lib needs a way to add additional fields. e.g. with comments in the prisma schema file
Here is an example of the current "problematic" setup:
Hi, I've found 2 suggested ways to add additional fields to a generated entity, neither works in an ideal way.
extending a class (Using custom types when generating #164 (comment))
with ResolveReference ([Question] Custom extra field not in Prisma Schema #117 (comment))
for 1), this does not work when the entity is being referenced by other entities (prisma references etc), resulting in
"Error: Schema must contain uniquely named types but contains multiple types named "X"."
for 2), this actually adds massive latency overhead to larger queries (10000 records) screenshotted traces below. the additional overhead comes from nests/apollo, but as the field is already fetched form the db, we should be talking about latencies in μs.
nestjs does not support graphql "extend" directive, so thats not an option either, i guess the only workaround here is to make a separate "ExtendedEntity extends Entity" and query that instead, but that "duplicates" the schema.
My use-case, is that i am "extending" an entity and adding fields to it, and joining them in a raw-query, the fields are already present, but having to add "Resolvefield" fields adds additional 2 seconds to the request.
I think this lib needs a way to add additional fields. e.g. with comments in the prisma schema file
Here is an example of the current "problematic" setup:
The text was updated successfully, but these errors were encountered: