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

    Jos

    10/27/2020, 4:45 PM
    Hey guys is there a way in prisma where we can get to switch between database URLs ,I find it hard trying to switch between various databases as it would require me rewriting my database url in the schema file each time
    n
    • 2
    • 2
  • t

    Taylor

    10/27/2020, 5:28 PM
    Hi dudes
  • t

    Taylor

    10/27/2020, 5:29 PM
    Is there a way that we can set an expiry time on a DB entry for Prisma with MongoDB connection?
  • w

    warmSnowyMorning

    10/27/2020, 11:27 PM
    Hey guys, what does the prisma schema look like for a situation where two users are friends? This is essentially a many to many relationship but with the table on itself. I'm very confused.
    i
    • 2
    • 6
  • d

    Derrick

    10/28/2020, 3:26 AM
    Anyone have experience with Google Compute Engine and Prisma1? I can't access the Prisma Server; supposedly they disable portmapping and docker containers run in host mode, but I can't access the Prisma Server using localhost
    👀 1
  • d

    DuckyDev

    10/28/2020, 8:45 AM
    Hi guys. I gave it a shot with primsa and nestjs and created the following scheme, used the experimental migrate feature to push it up to the postgres db
    Copy code
    model Items {
      id    String  @id @default(uuid())
      title String?
    }
  • d

    DuckyDev

    10/28/2020, 8:45 AM
    However the id in the table doesn't have a default value of
    uuid()
    , am I missing something here?
    n
    • 2
    • 2
  • d

    DuckyDev

    10/28/2020, 9:34 AM
    I'm about to setup a new project where we are going to use Prisma in favor of TypeOrm. However, the
    migrate
    function is still in an experimental state, but is there a big risk of using it anyways?
    n
    • 2
    • 9
  • d

    Derrick

    10/28/2020, 10:29 AM
    have most people shifted to prisma2?
    n
    • 2
    • 7
  • n

    Neel Modi

    10/28/2020, 1:26 PM
    I want to contact the developers of the website howtographql.com. Where and How do I contact them?
    n
    • 2
    • 1
  • j

    Jaafari El Housseine

    10/28/2020, 4:24 PM
    I have a question about prisma 1. Is there a way to query with regxp? I am using mysql as a database
  • n

    Natalia

    10/28/2020, 4:40 PM
    prisma rainbow First Prisma Meetup starts in 20 minutes! fast parrot Tammy Bryant will speak about database horror stories, we also have Hervé Labas’ talk about Prisma’s roadmap and a live interview with Tom Hutchinson, Head of Mobile at Rapha. Hosted by our wonderful Developer Advocate and MC superstar, Daniel Norman. Tune in here:

    https://youtu.be/SepT_whwFsAâ–¾

    prisma rainbow
    👻 1
    fast parrot 2
    prisma cool 3
  • j

    Jin

    10/28/2020, 5:47 PM
    Nice to meet you I am a beginner of Prisma 🙂
    🙌 1
  • n

    Natalia

    10/28/2020, 5:55 PM
    Our Software Engineer, Carmen Berndt, will give a talk about Prisma (Modern database tools for Node.js and TypeScript) at Node.js Israel Meetup in about 10 minutes! 🙂 You can join in on Zoom here.
    📺 4
    d
    • 2
    • 3
  • a

    Aaron Fulkerson

    10/29/2020, 10:09 PM
    Does it make sense to update the DB in the catch block if previous asynchronous code fails? What I’m doing is calling update then a Stripe function. If the call to the Stripe function fails I want to revert the update to the DB.
    r
    • 2
    • 1
  • k

    Kaspar Naaber

    10/30/2020, 2:34 PM
    Hello! Do I remember correctly that the graphql playground for prisma had some sort of a admin view where I could edit data in a table format? Or do I remember something wrongly? 🤔
    r
    • 2
    • 5
  • g

    Gaurav

    10/30/2020, 4:51 PM
    Hello! I am using Prisma 2 and Apollo server with graphql-code-generator for type safe resolvers. I am having trouble with enum mismatch in the to-be returned Prisma response object.
    Type '"PRIVATE"' is not assignable to type 'PrivacyScope'.
    Where
    enum PrivacyScope
    has been defined in the exactly same manner in both Prisma and API schema design. In client, I can see that Prisma uses
    makeEnun
    . What does it do? Could it be the source os this issue? What's the right way to find and fix this issue? P.S. I can also see that for
    enum PrivacyScope { PRIVATE }
    Prisma goes the
    makeEnum
    way whereas graphql-code-generator generates a corresponding
    enum
    type with key-value like
    Private = 'PRIVATE'
    • 1
    • 1
  • m

    Maykon Rodrigues dos Santos

    10/31/2020, 2:06 AM
    Hey team, I have a question. I have a container ( I am using docker compose ) and I would like to connect to the mariaDb using SSL. I can connect without SSL
    Copy code
    PRISMA_CONFIG: |
                    managementApiSecret: xxxxxxxxx2020
                    port: 4466
                    databases:
                      default:
                        connector: mysql
                        host: "<http://xxxxx.mariadb.database.azure.com|xxxxx.mariadb.database.azure.com>"
                        port: 3306
                        user: xxxxx@xxxx
                        password: xxxxxxx!
    I did not find a parameters for SSL connection on the docker: https://hub.docker.com/r/prismagraphql/prisma This is the instruction from Microsoft: https://docs.microsoft.com/en-us/azure/mariadb/howto-configure-ssl Thank you very much!
  • j

    Jared Hanstra

    10/31/2020, 2:09 AM
    Hi all - sorry to post in general but I'm stuck trying to get prisma set up with an AWS RDS postgres database and not sure where the issue is. My next.js app (using prisma client) cannot connect to my RDS database, but prisma studio and
    npx prisma migrate save/up
    interact with it just fine. It's complaining that authentication failed, but I know it's the correct username and password because I can interact with the database in every environment except in my app (prisma studio, prisma migrate, pgAdmin all work). Any ideas?
    Copy code
    Authentication failed against database server at `<postgres-url>`, the provided database credentials for `<user>` are not valid.
    
    Please make sure to provide valid database credentials for the database server at `<postgres-url>`.
        at $w.request (/Users/jh/coprime/hq/node_modules/@prisma/client/runtime/index.js:212:54)
        at processTicksAndRejections (internal/process/task_queues.js:97:5) {
      code: 'P1000',
      clientVersion: '2.9.0',
      meta: {
        database_user: 'coprime',
        database_host: '<postgres-url>'
      }
    }
    r
    • 2
    • 2
  • k

    Kul

    10/31/2020, 9:39 AM
    Is it possible to use a custom sqlite build when using prisma with sqlite?
  • s

    Shawn

    10/31/2020, 3:06 PM
    https://github.com/graphql-boilerplates/typescript-graphql-server/tree/master/advanced Does anyone know why I can't get the graphql create command to work for this?
    n
    • 2
    • 1
  • a

    Aaron Fulkerson

    11/01/2020, 8:40 PM
    Having a problem getting VSCode to pick up a one-to-one relation. I see the relation in the object that the server returns but VSCode is acting like the property doesn’t exist even after running prisma generate.
    j
    r
    • 3
    • 4
  • n

    Natalia

    11/02/2020, 1:21 PM
    👋 Join us at week’s events that are featuring or organised by Prisma: • November 2, 4PM CET - NodeConf Remote - Yoshua Wuyts, Software Engineer at Prisma, will give a talk WASM, Rust, and you - sign up to the conference here; • November 5, 7PM CET - GraphQL Mega Meetup + quiz with prizes - Prisma, commercetools and GraphQL London Meetup group join forces to bring you this GraphQL Mega Meetup. During the event you can take part in a quiz and win exciting prizes (lots of swag and tickets to GraphQL Galaxy Conference!) - 

    set a reminder on Youtube hereâ–¾

    ; Looking forward to having you there! 🤗
    💯 1
    prisma green 1
    fast parrot 2
  • m

    Moray Macdonald

    11/02/2020, 5:03 PM
    Hi everyone, where’s the best place to discuss
    graphql-yoga
    ? Is it even still maintained?
    b
    a
    r
    • 4
    • 5
  • n

    Neel Modi

    11/03/2020, 12:34 PM
    Can anyone here help me, I want to make a website similar to howtographql.com
  • e

    Eric Reis

    11/03/2020, 10:39 PM
    can I tell Prisma to transform timestamp columns into Date objects before returning me the queries result?
  • e

    Eric Reis

    11/03/2020, 10:43 PM
    wait, it seems like it does that by default, but can I customize it for other types?
  • e

    Eric Reis

    11/03/2020, 10:43 PM
    for an example I want the numeric datatype to be returned as a Decimal.js object
    r
    • 2
    • 1
  • a

    Aaron Fulkerson

    11/04/2020, 1:50 AM
    Is it intended that any enums in the Prisma schema file are ignored if they aren’t part of a model? It’d be nice to be able to have them regardless of whether or not they’re being used by a model.
    r
    • 2
    • 3
  • m

    martin

    11/04/2020, 4:03 AM
    How does one query for relations that don’t exist, i.e. are
    null
    ? For some reason, the following doesn’t work:
    Copy code
    await prisma.path.deleteMany({
    	where: { AND: [{ Facilitator: { is: null } }, { User: { is: null } }] }
    })
    r
    • 2
    • 11
1...402403404...637Latest