prisma / studio

🎙️ The easiest way to explore and manipulate your data in all of your Prisma projects.
https://www.prisma.io/studio
1.89k stars 47 forks source link

Error: Unknown arg `first` in first for type User. #422

Closed FrankFang closed 4 years ago

FrankFang commented 4 years ago

Since prisma@2.0.0-beta.7, the take argument replaces first and last.

Solution: Just downgrade to 2.0.0-beta.6

  1. Prisma2 version (prisma -v):
    @prisma/cli          : 2.0.0-beta.7
    Current platform     : windows
    Query Engine         : query-engine 5d39801acf2e3475bd9dab029a63634358b07bf1 (at C:\Users\...\AppData\Local\Yarn\Data\global\node_modules\@prisma\cli\query-engine-windows.exe)
    Migration Engine     : migration-engine-cli 5d39801acf2e3475bd9dab029a63634358b07bf1 (at C:\Users\...\AppData\Local\Yarn\Data\global\node_modules\@prisma\cli\migration-engine-windows.exe)
    Introspection Engine : introspection-core 5d39801acf2e3475bd9dab029a63634358b07bf1 (at C:\Users\...\AppData\Local\Yarn\Data\global\node_modules\@prisma\cli\introspection-engine-windows.exe)
    Format Binary        : prisma-fmt 5d39801acf2e3475bd9dab029a63634358b07bf1 (at C:\Users\...\AppData\Local\Yarn\Data\global\node_modules\@prisma\cli\prisma-fmt-windows.exe)
  2. Logs from Developer Tools Console, if any:
    
    Error in Prisma Client request: 

Error: Unknown arg first in first for type User. Did you mean cursor?

at Document.validate (D:\...\...\nextjs-blog-5\Prisma\Studio\-...-...-nextjs-blog-5\runtime\index.js:1:100210)
at Object.s [as User] (D:\...\...\nextjs-blog-5\Prisma\Studio\-...-...-nextjs-blog-5\runtime\index.js:1:70857)
at Object.n.<computed> [as findMany] (D:\...\...\nextjs-blog-5\Prisma\Studio\-...-...-nextjs-blog-5\runtime\index.js:1:72200)
at eval (eval at Photon.request (C:\Users\...\AppData\Local\Yarn\Data\global\node_modules\@prisma\cli\build\index.js:2:2320106), <anonymous>:5:50)
at Photon.request (C:\Users\...\AppData\Local\Yarn\Data\global\node_modules\@prisma\cli\build\index.js:2:2320295)
at PhotonService.respond (C:\Users\...\AppData\Local\Yarn\Data\global\node_modules\@prisma\cli\build\index.js:2:1312846)
at WebSocket.StudioServer.onWSMessage (C:\Users\...\AppData\Local\Yarn\Data\global\node_modules\@prisma\cli\build\index.js:2:2528084)
at WebSocket.emit (events.js:315:20)
at WebSocket.EventEmitter.emit (domain.js:485:12)
at Receiver.receiverOnMessage (C:\Users\...\AppData\Local\Yarn\Data\global\node_modules\@prisma\cli\build\index.js:2:2700686)


3. Does the issue persist even after updating to the latest `prisma` alpha? (`npm i -D @prisma/cli@alpha`)
YES
FrankFang commented 4 years ago

https://github.com/prisma/prisma/issues/2611

sdnts commented 4 years ago

Hey @FrankFang, there was a breaking change with pagination in Prisma Client 2.0.0-beta.7 that caused Studio to stop functioning. I've just pushed out 2.0.0-alpha.1290 that fixes this. Could you try updating?