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
Hello and first of all thanks for your work on this library :-)
I came accross what seems to be a bug in the sorting of nullable fields with typegraphql query dialect.
My stack
API is an apollo server using typegraphql with Prisma as the ORM (thus typegraphql-prisma package).
Front is react-admin with this package as the data provider. I'm using an apollo client and 'typegraphqlas thequeryDialect`.
Error
Wen I want to sort a column by a nullable field (e.g. firstName), the ApolloProvider yells this error: ApolloError: Variable "$orderBy" got invalid value "desc" at "orderBy[0].firstName"; Expected type "SortOrderInput" to be an object..
The GraphQL types, generated by typegraphql-prisma are the following :
Hello and first of all thanks for your work on this library :-)
I came accross what seems to be a bug in the sorting of nullable fields with typegraphql query dialect.
My stack
typegraphql
withPrisma
as the ORM (thus typegraphql-prisma package).as the
queryDialect`.Error
Wen I want to sort a column by a nullable field (e.g.
firstName
), the ApolloProvider yells this error:ApolloError: Variable "$orderBy" got invalid value "desc" at "orderBy[0].firstName"; Expected type "SortOrderInput" to be an object.
.The GraphQL types, generated by
typegraphql-prisma
are the following :The error thrown seems legit to me:
typegraphql
expect the sort params to be an objectI digged a bit into the source code where the orderBy params are built but I don't figured out any way to workaround this issue.
Do you have a suggestion ?
Thanks for your help !
The text was updated successfully, but these errors were encountered: