https://www.prisma.io/ logo
Join SlackCommunities
Powered by
# orm-help
  • a

    Aaron Fulkerson

    11/24/2020, 4:35 AM
    So is Prisma supposed to update the updatedAt timestamp when you call modelName.update() ???
    r
    • 2
    • 7
  • f

    Franciszek Stodulski

    11/24/2020, 11:23 AM
    Hey! I have a really weird issue. After running prisma generate with NestJS. I am getting this error.
    Copy code
    backend-v2 on  master [!+?] is 📦 v0.0.1 via ⬢ v15.0.1 took 12s 
    ➜ prisma generate
    Environment variables loaded from prisma/.env
    Error: 
    TypeError: Cannot read property 'filter' of undefined
        at getMappings (/Users/franciszekstodulski/develop/chillout/backend-v2/node_modules/@prisma/client/generator-build/index.js:76364:52)
    r
    • 2
    • 10
  • f

    Franciszek Stodulski

    11/24/2020, 11:23 AM
    Any one had one too?
  • f

    friebetill

    11/24/2020, 3:15 PM
    Hello, does anyone know how to use queryRaw with dates? This doesn’t work:
    Copy code
    queryRaw`SELECT * FROM "User" WHERE "createdAt" > ${'1999-01-08'};`
    queryRaw`SELECT * FROM "User" WHERE "createdAt" > '${'1999-01-08'}';`
    queryRaw`SELECT * FROM "User" WHERE "createdAt" < ${Date()};`
    r
    j
    • 3
    • 7
  • m

    martin

    11/24/2020, 5:06 PM
    Is there a way to disconnect relations using
    prisma.upsert
    ? For example:
    EventOptions: { connect: [{ eventOptionId: 'some_id' }] }
    it connects the
    EventOptions
    field to
    some_id
    , but leaves
    EventOptions
    other relations intact. Is there a way to replace the connections with only the
    some_id
    connection?
    r
    • 2
    • 9
  • r

    ryan

    11/24/2020, 5:10 PM
    👋 Hi all! We recently published a guide for new TypeScript developers, Learn TypeScript: A Pocketguide Tutorial The tutorial assumes no knowledge of TypeScript and is great for those just getting started. If that's you, hopefully this will be a helpful resource 🙂 If you have a colleague or friend that is interested in TypeScript, we'd be grateful if you could share the post with them as well. Thanks! https://www.prisma.io/blog/learn-typescript-a-pocketguide-tutorial-q329XmXQHUjz
    typescript 10
    fast parrot 8
    catjam 7
  • m

    Marvin

    11/24/2020, 8:52 PM
    Are there type definitions in one of the Prisma packages for the available scalar types in model fields and their valid attributes like
    @unique
    or
    @default
    ? Example
    @unique
    not allowed on
    @id
    fields or
    now()
    not allowed on
    String
    fields?
    r
    • 2
    • 5
  • f

    faithful

    11/24/2020, 8:59 PM
    hi anyone know how i can get rid of this error?
    s
    l
    • 3
    • 3
  • p

    providenz

    11/25/2020, 2:14 PM
    Hi everyone, we’re in the process of migrating a Prisma1 codebase to Prisma2 (Postgre). Are there any best practices or recommendations to run integrations tests against a real db ?
    r
    • 2
    • 2
  • r

    Roy Bakker

    11/25/2020, 3:01 PM
    Hi guys! First of all, great product, love using Prisma2 in production! Now i have the following problem, which gave me a lot of headache! Some info: I am running a production app on Google Cloud Run with a PubSub connected. The Cloud Run has a minimal instance of 1 and we are pinging it every minute to keep it "warm". Now often I receive this error, but have no clue how to solve it!
    PrismaClientKnownRequestError2: Socket Timeout Error
    at PrismaClientFetcher.request (/app/node_modules/@prisma/client/runtime/index.js:78585:15)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at runNextTicks (internal/process/task_queues.js:62:3)
    at listOnTimeout (internal/timers.js:523:9)
    at processTimers (internal/timers.js:497:7)
    at async CardsService.getCard (/app/src/services/Cards.js:20:16)
    at async PayNLTerminalService.saveNotification (/app/src/services/PayNLTerminalService.js:116:34) {
    code: 'UND_ERR_SOCKET_TIMEOUT',
    clientVersion: '2.10.2',
    meta: undefined
    }
    Can anyone please help me?
    r
    • 2
    • 1
  • t

    tylim

    11/25/2020, 6:00 PM
    heh guys some question about psql database modelling should i mix private and public info in one table, or one table for public info, one table for private info? let say i have a user, with name as public info and email as private info(edited)
    Copy code
    User table
    name 
    email
    or
    Copy code
    User Table
    email
    
    Profile table
    nanme
    s
    • 2
    • 1
  • k

    kani

    11/26/2020, 7:38 AM
    Hello
  • e

    Esau Kang

    11/26/2020, 11:56 AM
    Hey guys, I was just wondering if it's possible to @map two different Prisma fields to one column in a MySql db
    r
    • 2
    • 8
  • n

    Natalia

    11/26/2020, 3:50 PM
    prisma cool “What’s new in Prisma (v2.12.0)” live stream is starts in 10 minutes! Once again, Ryan and Niko from Prisma talk about new releases, planned features and other interesting bits from the Prisma world - this time they are also joined by a surprise guest! 😮* 

    Tune in here▾

    !* prisma rainbow
    💯 4
    prisma green 4
    fast parrot 3
  • j

    Jonathan Cooper

    11/26/2020, 7:44 PM
    hi guys, how do you do the typing on the home page? do you use a library or did you make it from scratch?
    n
    n
    • 3
    • 2
  • j

    Jonathan Cooper

    11/26/2020, 7:45 PM
    like the code block animation
  • v

    Ville

    11/26/2020, 10:53 PM
    Hi everyone! A few questions about Prisma: • How can I use uuid type with Prisma: https://www.postgresql.org/docs/9.1/datatype-uuid.html • Does prisma client have a programmatic API? • Is there a validation layer where I could plug e.g JSON Schema in Prisma? • When the migration tool is expected to be production ready? • Does the migration framework allow executing JS?
    r
    • 2
    • 4
  • t

    tylim

    11/27/2020, 8:05 AM
    heh guys
  • t

    tylim

    11/27/2020, 8:05 AM
    is nexus-plugin-prisma work with prisma2.0?
    d
    r
    • 3
    • 2
  • t

    tylim

    11/27/2020, 8:05 AM
    the documentation is really terrible and confusing
    r
    • 2
    • 10
  • n

    Nino Vrijman

    11/27/2020, 10:39 AM
    💡 A quick tip for anyone using Prisma’s new standalone Studio app who doesn’t have their.env file saved alongside their schema.prisma. https://twitter.com/ninovrijman/status/1332074237432049666
    💯 1
    prisma green 1
  • c

    Cristian

    11/27/2020, 10:45 AM
    Are there any plans to release a standalone Studio app for Windows?
    s
    r
    • 3
    • 2
  • j

    Jonathan Cooper

    11/27/2020, 12:33 PM
    thanks
  • t

    tylim

    11/27/2020, 12:42 PM
    Copy code
    const User = objectType({
      name: 'User',
      definition(t) {
        t.model.id()
        t.model.name()
        t.nullable.model.email() //nullable not working
        t.model.posts({
          pagination: false,
        })
      },
    })
    anyone know how to make the model nullable/nonNull, it is not working, the type follow the prisma model whether i use nullable or nonNulll
    n
    e
    • 3
    • 3
  • t

    tylim

    11/27/2020, 7:27 PM
    i have difficulty trying to generate nexus type, i am using it with firebase function
  • t

    tylim

    11/27/2020, 7:27 PM
    ts-node --transpile-only  src/apollo/schema
  • t

    tylim

    11/27/2020, 7:28 PM
    when i try to run this command, the code try to initialize my firebase app
  • t

    tylim

    11/27/2020, 7:28 PM
    i got this warning, then fail
  • t

    tylim

    11/27/2020, 7:28 PM
    {"severity":"WARNING","message":"Warning, FIREBASE_CONFIG and GCLOUD_PROJECT environment variables are missing. Initializing firebase-admin will fail"}
  • t

    tylim

    11/27/2020, 7:57 PM
    ok i solved this by download my firebase service account key and initialize the app with it, the warning above still there but no more error
1...406407408...637Latest