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

    ali

    03/04/2021, 7:25 PM
    Hi, I am wondering if there is any documentation or prior art on how to define foreign data wrapper in Prisma Postgres. Thanks in advance.
  • д

    Денис Батура

    03/04/2021, 10:09 PM
    Hi guys. I’m migrating from Rails to nestjs and trying to choose the right ORM. I have a lot of polymorphic relationships and wanna know what Prisma can offer for such case?
    g
    r
    • 3
    • 3
  • f

    Filippo Barcellos

    03/04/2021, 10:54 PM
    hey all. I’m new to back end and I’m trying to build a follow unfollow with prisma and I can’t make it work. my schema
    Copy code
    model User {
      id         Int     @id @default(autoincrement())
      email      String  @unique
      password   String
      username   String
      bio        String?
      image      String?
      posts      Post[]
      followedBy User[]  @relation("UserFollows")
      following  User[]  @relation("UserFollows")
    }
    I'm trying to update like this but is not working. I'm pretty sure I messed up somewhere
    Copy code
    await prisma.user.update({
          where: {
            id: userLogged,
          },
          data: {
            following: {
              id: //user to be followed
            },
          },
        });
    e
    r
    • 3
    • 10
  • h

    hoosan L

    03/04/2021, 11:20 PM
    Hi
  • a

    Andrew C

    03/05/2021, 2:58 AM
    👋 Hi everyone. If you’ve made a conditional “data fetching” call that switches between “GetStaticPros” and “GetServerSideProps”, how did you do it? My team-member, Caroline, edits content on our website via an admin area and would like to see changes in-real-time (i.e., faster than the server is able to generate a new static-version). As an alternative, has anyone used React Query (https://react-query.tanstack.com)?
  • n

    Nothing.

    03/05/2021, 10:04 AM
    Hi, how can I update a nested relation in prisma, I tried something like this:
    Copy code
    prisma.tablename.updateMany({
      where: { // some id },
      data: { emails: {
        set: [{ id: '<mailto:abdul@email.com|abdul@email.com>' }]
      } }
    })
    I was getting an error that "emails" field doesn't exist. But it does exist at the prisma level. It also work with 'create' and 'connect' when using the create method.
    r
    • 2
    • 3
  • m

    Manish

    03/05/2021, 11:05 AM
    Hi, I'm Manish. I'm building a content-based social network site. Can you help me select the right stack for my backend? Frontend: I'm using Nuxt/Vue as I have experience with it. Backend: I've mostly build backends with Node/Express REST API and jwt token based authentication. I believe my backend will benefit from Graphql and want to use it. So, here is what I have in mind for the backend: - Node.js - Prisma - I've used sequelize before and am convinced about using prisma in this project. - GraphQL - Not sure which libraries to use. Need help - Authentication - Not sure what to use. But I do want the users to be managed in the same postgresql database. Need help with selecting approach/libraries - Anything else that you can recommend. Database: postgresql Any help with the backend stack is really appreciated.
    r
    d
    • 3
    • 84
  • n

    Natalia

    03/05/2021, 2:46 PM
    prisma rainbow Prisma Meetup is coming up! On Tuesday, March 9th, 6 PM we will be live with three superstar speakers: • Alex DeBrie: "Picking a database for your serverless application in 2021" • Tim Suchanek (@tim2) will talk about Prisma in React Server Components react • @Matija Sosic will give us an intro to WASP 🐝 - DSL for building web apps with Prisma, React & Node.js You can check out the event for more info here or

    set a YouTube reminder▾

    . Hoping to see you there! 🤗
    📺 3
    prisma green 5
    fast parrot 4
    🇳🇬 3
    prisma rainbow 4
  • s

    Sting Alleman

    03/05/2021, 4:24 PM
    Hi all! Does Prisma use search indexes?
    r
    • 2
    • 1
  • a

    Alex Reyne

    03/06/2021, 4:18 PM
    How would one print a prisma error somewhere other than console?
    a
    r
    • 3
    • 2
  • a

    Alex Reyne

    03/06/2021, 4:18 PM
    For example if I wanted to send errors to a txt file
  • k

    Kishan Das

    03/07/2021, 5:15 PM
    Hello All, I m getting this below error while “prisma migrate up --experimental” Need help to resolve this error
  • k

    Kishan Das

    03/07/2021, 5:16 PM
    Error: Error in command input: Could not load migration from database. Migration name was: 20210307162439-updated-the-notification-context
  • d

    David

    03/08/2021, 5:33 AM
    Hi All, Want to ask, actually right now I have a view in MySQL. And trying to add it to Prisma’s Schema so I can fetch data from there. But there is a problem, why it’s will create a new table under that View’s name when I run migrate command? I am using Prisma with NexusJS. Anyone can help me? very confused right now.
    r
    • 2
    • 5
  • d

    David

    03/08/2021, 6:53 AM
    The issue is submitted on Github, by link below: https://github.com/prisma/prisma/issues/6015
  • v

    Vasu Sengunthar

    03/08/2021, 10:36 AM
    gettitn error for production
    r
    • 2
    • 7
  • e

    Ethan Zoller

    03/08/2021, 10:01 PM
    I have two tables, users and sites. Users can hold multiple sites, sites can hold multiple users. How would I use Prisma client if I want to add a site to a user?
    p
    • 2
    • 2
  • r

    Robert

    03/09/2021, 7:42 AM
    Hey folks. Is this not allowed?
    Copy code
    const count = await db.recipe.count({ where, distinct })
    It passes type check but gives me an error
    Copy code
    Error: Unknown arg `distinct` in distinct for type AggregateRecipe. Did you mean `select`?
    I have a function that optionally takes a
    distinct
    param for instance to select only 1 recipe per author (
    distinct: 'authorId'
    ) The function is paginated so I'd like to know how many total recipes (distinct by authorId) there are in that case!
    r
    • 2
    • 4
  • s

    Sandeep Raparthi

    03/09/2021, 8:12 AM
    Hi team I am new to prisma and trying to run command : npx prisma generate behind a proxy but I am facing the below issue
  • n

    Natalia

    03/09/2021, 12:55 PM
    Hey folks! Today at 6 PM CET we are hosting our Prisma Meetup with superstar speakers on board: • Alex DeBrie: "Picking a database for your serverless application in 2021" • Tim Suchanek (@tim2) will talk about Prisma in React Server Components react • @Matija Sosic will give us an intro to Wasp 🐝 - DSL for building web apps with Prisma, React & Node.js You can check out the event for more info here or 

    set a YouTube reminder▾

    . Hoping to see you there! 🤗
    fast parrot 2
    prisma green 2
    💚 5
  • b

    Bård

    03/09/2021, 1:43 PM
    Hey! Anyone have some idea how you would solve showing the potential amount of results of a query? Say you have a page with a list of items. And in the sidebar you have some filters. Now next to the filters I want to have a number which represents the amount of results behind that filter: Categories: ☐ Apparell (20) ☐ Accessories (5) ☐ Other (7) etc… The obvious answer would be to run each individual query and just do a count on the result. I’m just afraid of the performance and DB calls this would result in. Dunno if this is too off topic, but if anyone have any ideas I’m open for em 🙂
    k
    r
    • 3
    • 4
  • n

    Natalia

    03/09/2021, 5:00 PM
    prisma rainbow Prisma Meetup is live! fast parrot Join us on YouTube:

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

    fast parrot 1
    prisma rainbow 1
  • s

    sanyam pandey

    03/10/2021, 10:17 AM
    Hello, this example seems to have broken dependencies prisma-examples/typescript/graphql-nextjs/
  • s

    sanyam pandey

    03/10/2021, 10:17 AM
    any suggestions?
    r
    • 2
    • 7
  • n

    Natalia

    03/10/2021, 12:19 PM
    typescript Hey folks!  Ryan Chenkie, Developer Advocate at Prisma, will speak about TypeScript Beyond the Basics at WarsawJS Meetup today! 🇵🇱 The meetup starts at 6:30 PM CET.  The full line up: ⭐ Manjula Dube : “Web for Everyone – Accessibility with React” ⭐ Amit Sheen : “Mapping mouse position with CSS” ⭐ Damian Dulisz : “Intro to Composition-API” ⭐ Ryan Chenkie : "TypeScript Beyond the Basics" You can RSVP and find out more on Meetup or

    set a YouTube reminder here▾

    . The networking session will be hosted after the event on the Discord voice channel. Here's an invitation link: https://discord.gg/QcC2jRcM Catch you there! 🤗
    typescript 2
    fast parrot 1
    • 1
    • 1
  • r

    ryan

    03/10/2021, 10:01 PM
    hi all 👋 I invite you to join @Matt Mueller (Prisma Client PM) (Product Manager at Prisma) and I tomorrow as we chat about transactions in our first ever Prisma Chats livestream. I will interview Matt about what transactions are, how they are used, how Prisma's
    $transaction
    API fits in, and more. 11 am EST / 5 pm CET Hope to see you there!

    https://youtu.be/_8ex2PmdXPM▾

    💯 5
    fast parrot 5
    🚀 3
    prisma green 5
    prisma rainbow 1
    prisma cool 4
    📣 3
  • d

    Dale Watson

    03/11/2021, 1:34 AM
    hello if im using nextjs-prisma-postgress in serverside and deploy to vercel what is the service-cost that i will pay ? the vercel function ?? will updating data with prisma will trigger vercel function ?? im new with prisma and SQL workflow, at least i need to know which service that is not free previously i was using nextjs and firebase service, so the cost is on firestore & cloud function
    r
    • 2
    • 1
  • p

    Philipp Humburg

    03/11/2021, 6:33 AM
    Hey, im new to prisma, working through the docs and doing the example for nexus graphql prisma is broken on the testing with db chapter, the test helper funktion is Not right
    r
    a
    • 3
    • 10
  • s

    Slackbot

    03/11/2021, 10:12 AM
    This message was deleted.
    r
    l
    m
    • 4
    • 3
  • l

    Lucas

    03/11/2021, 10:55 AM
    Does prisma has any plans of maintaining
    Nexus
    ? Who should we reach out if we are willing to help? Nexus is awesome but seeing the lack of documentation, examples, issues response it doesn't seems to be 100% ready to be used in production yet? Anyone has any thoughts on that or is using it in production? I am starting a new project and thinking between using nexus, type-graphql or graphql.js
    n
    • 2
    • 3
1...421422423...637Latest