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

    user

    09/13/2021, 10:57 AM
    GraphQL Berlin Meetup #23 - Franco Risso - Using GraphQL to manage contributions from multiple teams

    https://www.youtube.com/watch?v=rATfJAV-Ydc▾

    ◭ This talk will touch on how Zalando uses Rendering Engine, a GraphQL based framework, to improve collaboration from multiple teams into one repository, abstracting common functionalities, data management, and providing typing for consumption of data. How this compares with the previous Mosaic architecture and how GraphQL is the right tool to reduce friction among teams. ◭ Franco (@francorisso) is a Software Engineer from Argentina with 15 years of experience working in Zalando for almost 5 years. He is passionate about software architecture, product development, and chocolate ◭ This talk has been recorded during GraphQL Berlin Meetup. Join our GraphQL Berlin Meetup group here: https://www.meetup.com/graphql-berlin ------------------------ 📚 Resources: ✅ Subscribe to Prisma: https://www.youtube.com/channel/UCptAHlN1gdwD89tFM3ENb6w?sub_confirmation=1 ✅ Get help from the Prisma Community: https://slack.prisma.io/ ✅ Learn more about Prisma: ◭ Website: https://www.prisma.io ◭ Docs: https://www.prisma.io/docs ◭ Quickstart: https://pris.ly/qstart ------------------------ 💬 Connect with Prisma: Twitter: https://twitter.com/prisma Instagram: https://www.instagram.com/prisma.io/ TikTok: https://www.tiktok.com/@prismadata Facebook: https://www.facebook.com/prisma.io LinkedIn: https://www.linkedin.com/company/prisma-io ------------------------ Prisma sponsors human-reviewed, professional closed captions for ANY video valuable to our community (for example, about: Node.js, TypeScript & Type Safety, Prisma, databases, etc). Get your FREE captions here: https://pris.ly/closedcaptions
  • y

    YErii

    09/13/2021, 10:58 AM
    Hi, is there any way to generate default inputs like
    Xx_WhereInput_
    XxWhereUniqueInput
    Xx_OrderByInput_
    … without using
    t.crud.xxs()
    ?
  • y

    YErii

    09/13/2021, 11:00 AM
    because we may want to control the api without expose everything out, but it’s better to provide the basic types mentioned above
    r
    • 2
    • 4
  • m

    Mohammed Alrea

    09/13/2021, 5:55 PM
    is there an example to use Prisma with sqlserver with azure repo or example or https://github.com/prisma/prisma/discussions/9236
  • z

    zayed islam

    09/13/2021, 7:21 PM
    hello
  • h

    Harsha MV

    09/14/2021, 2:01 AM
    If a
    project
    hasMany
    projectImages
    when running a create how can we loop and connect n create those new records for
    projectImages
    r
    • 2
    • 1
  • h

    Harsha MV

    09/14/2021, 2:02 AM
    when you are not certain how many of them will be filled in the form
  • y

    YErii

    09/14/2021, 3:13 AM
    Hi, is there any notice when or why nexus-plugin-prisma or prisma has changed
    XxOrderByInput
    to
    XxOrderByWithRelationInput
    ?
    r
    • 2
    • 1
  • y

    YuukiKanasugi

    09/14/2021, 3:48 AM
    Wrote the article about the way to write transaction of Prisma in Japanese japan parrot japan parrot After 2.29.0, we can use Long-running transaction , So I mainly focus on this topic! Thanks! https://zenn.dev/kanasugi/articles/4dbca26e1c4753
    💯 1
    ❤️ 1
  • k

    kailoon

    09/14/2021, 7:39 AM
    I get this when running
    npx prisma studio
    Copy code
    Prisma Studio is up on <http://localhost:5555>
    warn(prisma-client) Already 10 Prisma Clients are actively running.
    I did use the workaround
    Copy code
    import { PrismaClient } from "@prisma/client"
    
    const prisma = global.prisma || new PrismaClient()
    
    if (process.env.NODE_ENV === "development") global.prisma = prisma
    
    export default prisma
    Is this normal? Or these are not related?
    r
    • 2
    • 5
  • k

    kailoon

    09/14/2021, 7:42 AM
    what seem to be the problem?
  • m

    Maisnam Raju

    09/14/2021, 9:10 AM
    hi guys, I'm new to prisma and wanted to ask if there is a way to use timestamp as in
    1631610606
    instead of the default datetime format ?
    r
    • 2
    • 1
  • r

    Russell Ormes

    09/14/2021, 9:11 AM
    Hello all. I am looking for some help with building the client for my docker container. The container is an Alpine based custom container. To that end I have added
    linux-musl
    to my
    binaryTargets
    in my schema. I added native (not sure if it is necessary) for the local build, on Ubuntu 18.04.
    Copy code
    datasource db {
      provider      = "postgresql"
      binaryTargets = ["native", "linux-musl"]
      url           = env("DATABASE_URL")
    }
    OK, so my assumption it that on running the client generation script, the binary should get downloaded into the output directory. The only engine binary that is copied to the output directory is
    libquery_engine-debian-openssl-1.1.x.so.node
    which satisfies the
    native
    option, but nothing for
    linux-musl
    . Checking the directory
    node_modules/@prisma/engines/
    I also see that only the
    *-debian-*
    engines are present. I guess my question is, how do I get the client generator to download the binaries required by the
    biaryTargets
    array? Or is there something I am missing here? I have searched here for a solution but no-one appears to have the same issue.
    r
    • 2
    • 15
  • m

    Mischa

    09/14/2021, 9:16 AM
    is it convention in the prisma schema to have scalar fields camelCase and Relation fields be CapitalCase?
    r
    j
    • 3
    • 20
  • r

    Rene Nielsen

    09/14/2021, 9:18 AM
    Anyone know why i can't get this unique working? I can create multiple instances of the same slug.
    Copy code
    model Instructor {
      id                  String  @id @default(dbgenerated()) @map("_id") @db.ObjectId
      slug                String  @unique
    }
    
    const instructorSlug = slug(instructorInput.name);
    
    await this._dbClient.instructor.create({
      data: {
        slug: instructorSlug,
      }
    }
    r
    • 2
    • 4
  • v

    Vladi Stevanovic

    09/14/2021, 10:24 AM
    ✨ Event in London + online Workshops : CItyJS conf ✨ • Free workshop: Thursday, Sept 16th, 4:00pm BST "Building a Fullstack app using #NextJS and Prisma" by @Mahmoud • Onsite event: Friday, Sept 17th @Fulham Beach Bar 🏝️ with our CEO @sorenbs there to answer any questions! 🙌 👉 RSVP here: https://cityjsconf.org/buytickets
    🙌 1
  • m

    Mohammed Alrea

    09/14/2021, 10:56 AM
    Prisma schema loaded from prisma\schema.prisma Datasource "db" - SQL Server Error: P3020 The automatic creation of shadow databases is disabled on Azure SQL. Please set up a shadow database using the
    shadowDatabaseUrl
    datasource attribute. Read the docs page for more details: https://pris.ly/d/migrate-shadow
  • p

    Patrick

    09/14/2021, 11:09 AM
    Let’s say I have monolithic app on Heroku that runs Prisma with Postgres. I’d like to start using AWS Lambdas side-by-side (deployed with Serverless Framework) and access my database. How would you do that? Are out there any guides or examples?
    r
    • 2
    • 6
  • m

    Mohammed Alrea

    09/14/2021, 11:15 AM
    is there any exmaple with sqlserver with Azure SQL
  • d

    Daniell

    09/14/2021, 11:16 AM
    Is it possible to persist manual changes done to the prisma.schema file? After introspect I have some ignored models so I add a unique identifier to them but after introspecting again, the models are also ignored again
    r
    j
    m
    • 4
    • 8
  • e

    Eric Kidd

    09/14/2021, 12:57 PM
    Hello. We have a Postgres database running on Citus, which technically supports
    FOREIGN KEY
    constraints. But in practice, it's very hard to make them work. Is there any way to use things like
    db pull
    and Prisma joins without actually having
    FOREIGN KEY
    constraints? For example, could
    db pull
    be convinced to ignore manually-added relations? Or is this basically hopeless? Thank you for any advice you can provide!
    r
    j
    • 3
    • 30
  • h

    Harsha MV

    09/14/2021, 1:27 PM
    what the right way to increment count of a field in the database when finding a record? https://stackoverflow.com/questions/69178675/prisma-increase-count-by-1-after-find-query
    r
    • 2
    • 3
  • b

    Bhavesh Gohel

    09/14/2021, 1:38 PM
    Hi @Ryan @Mahmoud , Any plans to support TimescaleDB natively in Prisma 3? Currently following this thread - https://github.com/prisma/prisma/issues/3228 and workaround - https://medium.com/geekculture/set-up-a-timescaledb-hypertable-with-prisma-9550652cfe97 Please reply if any other solution exist . 🙏
    r
    • 2
    • 4
  • h

    Harsha MV

    09/14/2021, 2:13 PM
    am getting this error in Production server. But when i run the same in local connected to the production server it doesnt throw any error. Any help heere?
    Copy code
    2021-09-14T14:11:16.473Z	7d2b4b8b-a60a-4d0e-9752-bd5a29000b57	ERROR	PrismaClientValidationError: Unknown arg `views` in data.views for type ProjectUpdateInput. Did you mean `id`?
        at Document.validate (/var/task/node_modules/@prisma/client/runtime/index.js:35604:19)
        at PrismaClient._executeRequest (/var/task/node_modules/@prisma/client/runtime/index.js:37991:17)
        at consumer (/var/task/node_modules/@prisma/client/runtime/index.js:37936:23)
        at /var/task/node_modules/@prisma/client/runtime/index.js:37938:47
        at AsyncResource.runInAsyncScope (async_hooks.js:197:9)
        at PrismaClient._request (/var/task/node_modules/@prisma/client/runtime/index.js:37938:25)
        at request (/var/task/node_modules/@prisma/client/runtime/index.js:38041:77)
        at _callback (/var/task/node_modules/@prisma/client/runtime/index.js:38246:14)
        at PrismaPromise.then (/var/task/node_modules/@prisma/client/runtime/index.js:38253:23) {
      clientVersion: '3.0.2'
    }
    RequestId: 7d2b4b8b-a60a-4d0e-9752-bd5a29000b57 Error: Runtime exited with error: exit status 1
    Runtime.ExitError
    r
    • 2
    • 8
  • h

    Harsha MV

    09/14/2021, 2:13 PM
    This is my code:
    Copy code
    await prisma.project.update({
            where: { id: project.id },
            data: {
                views: {
                    increment: 1,
                },
            },
        });
  • h

    Harsha MV

    09/14/2021, 2:14 PM
    @Ryan would u have any clue?
  • d

    Daniel Sieradski

    09/14/2021, 2:59 PM
    Hi, I have a Postgres DB with cascade delete activated for a foreign key on my table. When I attempt to execute a deletion directly in my database, the cascade works just fine. However, when I execute it in Prisma, I’m getting the following error:
    Copy code
    message": "\nInvalid `prisma.schedule.delete()` invocation:\n\n\n The change you are trying to make would violate the required relation 'ScheduleTotimeSlot' between the `Schedule` and `timeSlot` models.",
    How do I get Prisma to understand Postgres is cascading on delete?
    r
    • 2
    • 1
  • d

    Daniel Sieradski

    09/14/2021, 3:01 PM
    never mind i found https://www.prisma.io/docs/guides/database/advanced-database-tasks/cascading-deletes/postgresql
    j
    • 2
    • 1
  • h

    Henry Wu

    09/14/2021, 8:07 PM
    In a findMany, how do I filter for if an optional relation exists?
  • j

    Jonathan

    09/14/2021, 8:57 PM
    I have a follow-up question to something I asked earlier here. In a monolith app (let’s say, a single docker container), that is always-on, is it common to always have at least one or two connections running. I would assume that if no users are using the application, the nr of connections should go to 0? But we have always at least 2 connections (even In a test environment where no users are using it), and it never goes to 0. Does that suggest that prisma is somehow not disconnecting, and has some sort of “disconnect leak”?
    j
    • 2
    • 4
1...481482483...637Latest