Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

orderByRelation previewFeatures gives an error #1063

Closed
kanso-git opened this issue Mar 22, 2021 · 2 comments · Fixed by #1070
Closed

orderByRelation previewFeatures gives an error #1063

kanso-git opened this issue Mar 22, 2021 · 2 comments · Fixed by #1070

Comments

@kanso-git
Copy link

kanso-git commented Mar 22, 2021

I have tried to use the orderByRelation previewFeatures released in version "@prisma/client": "2.19.0",

generator client {
  provider = "prisma-client-js"
  previewFeatures=["orderByRelation"]
}

After generating the client npx prisma generate and trying to start the dev server i've got the below issue :

Error: Could not find ordering argument for Blog.posts
    at SchemaBuilder.argsFromQueryOrModelField (C:\Users\v_2190\nexus-plugin-prisma\examples\blog\node_modules\nexus-plugin-prisma\src\builder.ts:663:15)
    at SchemaBuilder.determineArgs (C:\Users\v_2190\nexus-plugin-prisma\examples\blog\node_modules\nexus-plugin-prisma\src\builder.ts:602:19)
    at SchemaBuilder.buildArgsFromField (C:\Users\v_2190\nexus-plugin-prisma\examples\blog\node_modules\nexus-plugin-prisma\src\builder.ts:584:17)
    at SchemaBuilder.buildFieldConfig (C:\Users\v_2190\nexus-plugin-prisma\examples\blog\node_modules\nexus-plugin-prisma\src\builder.ts:574:18)
    at Proxy.fieldPublisher (C:\Users\v_2190\nexus-plugin-prisma\examples\blog\node_modules\nexus-plugin-prisma\src\builder.ts:525:34)
    at Object.definition (C:\Users\v_2190\nexus-plugin-prisma\examples\blog\src\schema\types\Blog.ts:10:13)
    at SchemaBuilder.walkOutputType (C:\Users\v_2190\nexus-plugin-prisma\examples\blog\node_modules\nexus\src\builder.ts:1532:9)
    at SchemaBuilder.walkTypes (C:\Users\v_2190\nexus-plugin-prisma\examples\blog\node_modules\nexus\src\builder.ts:634:16)
    at SchemaBuilder.getFinalTypeMap (C:\Users\v_2190\nexus-plugin-prisma\examples\blog\node_modules\nexus\src\builder.ts:804:10)
    at makeSchemaInternal (C:\Users\v_2190\nexus-plugin-prisma\examples\blog\node_modules\nexus\src\builder.ts:1662:92)
[ERROR] 10:25:33 Error: Could not find ordering argument for Blog.posts

Many thanks in advance

@nhuesmann
Copy link
Contributor

This prevented me from upgrading as well.

@airidasj
Copy link

Please fix this. Because it is hard to model project architecture, knowing that this is a feature, but being unable to use it. :) Love your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants