https://www.prisma.io/ logo
Join SlackCommunities
Powered by
# prisma-client
  • c

    Chris

    09/07/2021, 7:25 PM
    It looks like the same kind of issue described here https://githubmemory.com/repo/prisma/prisma/issues/7395
    r
    • 2
    • 17
  • a

    Alexandr Bordun

    09/08/2021, 6:58 AM
    After migrating to 3.0.1 - the console started showing this line:
    Copy code
    ✔ Generated Prisma Client (3.0.1) to ./node_modules/@prisma/client in 230ms
    You can now start using Prisma Client in your code. Reference: <https://pris.ly/d/client>
    import { PrismaClient } from '@prisma/client' const prisma = new PrismaClient()
    Copy code
    warn Prisma 2.12.0 has breaking changes.
    You can update your code with
    `npx @prisma/codemods update-2.12 ./`
    Read more at <https://pris.ly/2.12>
    I’m mostly concerned about
    Prisma 2.12.0 has breaking changes
    anyone knows the reason/solution for this?
    r
    • 2
    • 9
  • h

    Hector

    09/08/2021, 3:23 PM
    Hello, qq, if I'm using an auto-generator (Pal.js) for my GraphQL schema and resolvers from Prisma, is there a way to specify a field which is not coming from the database but another source? like a placeholder field so I can fill it later when I implement/modify my resolver?
    r
    • 2
    • 3
  • p

    Pascal Sthamer

    09/09/2021, 12:36 PM
    A few days ago, all my GitHub actions started to fail, because the Prisma client failed to generate and thus the types were missing. I still was not able to figure out, why the following happens:
    Copy code
    ➤ YN0007: │ prisma@npm:2.30.3 must be built because it never has been before or the last one failed
    141
      ➤ YN0007: │ @prisma/client@npm:2.30.3 [2a8e9] must be built because it never has been before or the last one failed
    142
      ➤ YN0000: │ @prisma/client@npm:2.30.3 [2a8e9] STDOUT Prisma schema loaded from prisma/schema.prisma
    143
      ➤ YN0000: │ @prisma/client@npm:2.30.3 [2a8e9] STDERR info The postinstall script automatically ran `prisma generate`, which failed.
    144
      ➤ YN0000: │ @prisma/client@npm:2.30.3 [2a8e9] STDERR The postinstall script still succeeds but won't generate the Prisma Client.
    145
      ➤ YN0000: │ @prisma/client@npm:2.30.3 [2a8e9] STDERR Please run `yarn prisma generate` to see the errors.
    146
      ➤ YN0000: │ @prisma/client@npm:2.30.3 [2a8e9] STDOUT
    It works fine locally. Anybody has an idea?
    r
    • 2
    • 6
  • m

    Mischa

    09/10/2021, 3:18 PM
    improving my prisma lambda layer CDK construct: https://github.com/jetbridge/jetkit-cdk/pull/30 @Ryan
    🙌 1
  • k

    Kul

    09/11/2021, 7:56 AM
    can apps using prisma only for the client/query be deployed without the sidecar binaries now that node-api method is the default for accessing the engine?
    ✅ 1
    r
    • 2
    • 8
  • r

    Ramon Pans

    09/11/2021, 11:11 AM
    Hey guys!! Is there a way to add fields to the database but have them not fetch by default / not show up on the generated types?
    r
    • 2
    • 3
  • r

    Ramon Pans

    09/11/2021, 1:20 PM
    What are the reasons for the client’s
    create
    method not existing?
    r
    • 2
    • 17
  • b

    Ben Ezard

    09/11/2021, 4:18 PM
    I have a significant memory leak (running 8 Jest threads uses ~22GB of RAM in total, across ~700 tests) in my tests, and I believe it's due to my usage of Prisma The issue seems to be that each test uses its own instance of
    PrismaClient
    , each of which hangs on to some memory even after
    $disconnect
    is called This appears to be backed up by the warning messages that I get saying
    Already 10 Prisma Clients are actively running
    I'd expect
    $disconnect
    to kill and release the memory of the underlying engine instance, but I assume there's a good reason why this isn't done What's the recommended way of handling this please? Sadly it's private code so I can't link to a repo, but I'm happy to provide any requested details where possible
    👀 1
    r
    r
    • 3
    • 7
  • c

    Casey Chow

    09/13/2021, 9:53 PM
    tAre there any conditions where the client would be missing Are there any conditions where the client would refuse to make the create/createMany and upsert functions? I’m noticing they’re missing from my schema for one model.
    r
    • 2
    • 5
  • r

    Russell Ormes

    09/14/2021, 9:21 AM
    Sorry for cross posting, but I just saw there is a specific client channel 🤦🏻 https://prisma.slack.com/archives/CA491RJH0/p1631610712029900
  • g

    Gautam Paranjape

    09/14/2021, 6:19 PM
    Why am I getting this error even though I’m in the latest version of prisma?
    r
    • 2
    • 1
  • c

    Chris

    09/15/2021, 7:07 PM
    Hi Guys, I'm looking over some code where a generated type, let's call it
    UserCreateManyInput
    (really, anything
    TCreateManyInput
    ) is used not for performing actions against the db, but for declaring the type of data returned from a raw query. Is this an appropriate use? The name certainly leads me to believe there could be problems with this
  • c

    Chris

    09/15/2021, 7:46 PM
    I'd think just using
    User
    would be the path to take (when the query does in fact correspond to this)
    r
    • 2
    • 1
  • m

    Mischa

    09/16/2021, 4:51 PM
    my quest to build a minimal prisma lambda layer continues https://github.com/jetbridge/jetkit-cdk/pull/31
    🙌 1
    g
    • 2
    • 2
  • h

    Harsha MV

    09/18/2021, 5:17 PM
    anyone has inteagrated with Supabase?
  • h

    Harsha MV

    09/18/2021, 5:17 PM
    am getting the following error
    bind message supplies 1 parameters, but prepared statement \"s1\" requires 2
  • h

    Harsha MV

    09/18/2021, 5:17 PM
    https://stackoverflow.com/questions/69236812/prisma-supabase-bind-message-supplies-1-parameters-but-prepared-statement
  • m

    Mischa

    09/21/2021, 7:10 AM
    Upgrading to Prisma 3.0.1, I'm getting a new error that looks like it could be related to importing types across packages in my npm7 monorepo
    error TS2742: The inferred type of 'doStuff' cannot be named without a reference to 'myapp-repo/node_modules/.prisma/client'. This is likely not portable. A type annotation is necessary.
    easily worked around but strange. I'm trying to infer return types of functions doing prisma queries across packages so I guess that doesn't work anymore
    j
    • 2
    • 3
  • l

    Lukas Heddendorp

    09/22/2021, 8:52 AM
    Hey prismasters I have a bit of a problem. My app works well for quite some time, just to get stuck in a loop of promise rejections.
    Copy code
    2021-09-22T08:32:41.838273674Z (node:27) UnhandledPromiseRejectionWarning: Error:
    2021-09-22T08:32:41.838296175Z Invalid `prisma.user.findFirst()` invocation:
    2021-09-22T08:32:41.838369076Z
    2021-09-22T08:32:41.838374676Z
    2021-09-22T08:32:41.838378576Z   Timed out fetching a new connection from the connection pool. (More info: <http://pris.ly/d/connection-pool>, Current connection limit: 3)
    2021-09-22T08:32:41.838395576Z     at PrismaClientFetcher.<anonymous> (/usr/src/app/dist/apps/api/main.js:39266:31)
    2021-09-22T08:32:41.838400576Z     at Generator.throw (<anonymous>)
    2021-09-22T08:32:41.838404576Z     at rejected (/usr/src/app/node_modules/tslib/tslib.js:115:69)
    This is the issue that keeps popping up, I'm guessing the findFirst isn't even the problem but rather my connections. I'm running this on the azure app service so I was also wondering if I could increase my connection limit or if that's useless without more cpu cores. Grateful for any hints from you side 🙂
    r
    • 2
    • 5
  • p

    Peter Kim

    09/23/2021, 6:45 AM
    Is there any way to use mysql’s Spatial Data Types(eg: Point) in prisma now? I know there is Unsupported field types in prisma, but create and update is not available in the client. So how can I create or update Point type in prisma? And how can I select the point type?
    r
    • 2
    • 4
  • l

    Lukas Heddendorp

    09/23/2021, 10:23 AM
    I've created a new uuid column. Is there a nice trick to automatically populate it or do I have to go through all records one by one?
    r
    • 2
    • 1
  • s

    Shubham Patil

    09/25/2021, 6:23 PM
    hmm so my postgres db is running at port 5432 but prisma client says it cant reach it at that port?
  • s

    Shubham Patil

    09/25/2021, 6:24 PM
    the name for my db is correct the database url
  • s

    Shubham Patil

    09/25/2021, 6:24 PM
    and the username and password
  • s

    Shubham Patil

    09/25/2021, 6:25 PM
    wait a minute
  • s

    Shubham Patil

    09/25/2021, 6:25 PM
    im doing this through WSL while my postgres db is running natively on windows
  • j

    John Peña

    09/27/2021, 7:47 PM
    any postgres users ever seen the following error immediately following a migration?
    "cached plan must not change result type"
    r
    • 2
    • 4
  • l

    Lukáš Stuchlík

    09/29/2021, 6:45 AM
    Hello, I'd like to ask a question regarding the client/engine - how does Prisma construct queries for Postgres with some particularly big selects? we're talking a select that spans maybe 7 entities or more (quite extensive GQL query).. I mean, that's what SQL joins are for, but when I look into logs, I see a ton of
    prisma:query
    selects that operate on a single table with ID constraint, instead of joins through foreign keys.. Is it because of performance? are foreign keys utilized in any other way than referential integrity? can we speed up such selects in any way?
    r
    • 2
    • 1
  • m

    Michael B

    09/29/2021, 11:38 AM
    Hi everyone. I have a question about nullable strings and filtering them out and the generated return Type. Given a user like
    Copy code
    model User {
      email String?
    }
    and requesting users in the client
    Copy code
    const users = await prisma.users.findMany({
      where: {
        NOT: {
          email: {
            equals: null,
          },
        },
      },
    })
    Is it possible to get a returned type of?
    Copy code
    { email: string }[]
    The current return type I am getting is
    Copy code
    { email: string | null }[]
    r
    • 2
    • 3
1...111213...23Latest