Replies: 1 comment 1 reply
-
The logic is as you see - for nullable columns you can sort by nulls. There's no abstraction to unify this. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi folks,
I'm upgrading from older dependencies, and now running current Prisma Typegraphql I'm seeing a discrepancy in how OrderBy is handled when compared to previous versions.
It seems that if something is marked as required in my Prisma Model, the generated OrderBy file assigns the following:
However, if something is marked as optional in my Prisma schema, it results in the following:
SortOrderInput is defined as...
This is challenging, as when trying to allow dynamic sorting controlled by the user, I don't know how to determine when I can just pass
orderBy: [{key: 'asc'}]
or when I need to passorderBy: [{key: {sort: 'asc'}}]
Is there any way to make everything follow just the SortOrder logic?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions