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

    Robert Witchell

    10/12/2021, 4:16 AM
    What's the process to get prisma running in heroku? my current setup is: • needs to be
    yarn node ./dist/src/index.js
    • I have path aliases, so when i run
    tsc
    , my ./dist folder is throwing errors that I cannot import
    @myCustomAlias/server
    . Should I use webpack or babel here? I'm hoping someone can help explain what process I need to run.
    build: tcs && webpack
    ? to get aliases working in JS?
    r
    • 2
    • 5
  • d

    Dante

    10/12/2021, 5:50 AM
    I am so sad because the apollo server schema system can’t use typescript’s type which prisma creates.
    Copy code
    const usersWithArgs = Prisma.validator<Prisma.UserArgs>()({
      include: {
        _count: {
          select: {
            followers: true,
            followings: true,
          },
        },
      },
    });
    
    type UsersWithArgs = Prisma.UserGetPayload<typeof usersWithArgs>[];
    
    export const QueryTypeDefs = gql`
      type Query {
        users: [User]! # Wanna use type UsersWithArgs in Here
    }
    c
    • 2
    • 3
  • j

    Jemin Kothari

    10/12/2021, 8:47 AM
    Hello @Ahmed @Ryan I have one question regarding the pal.js with nexus and prisma
    r
    a
    • 3
    • 10
  • m

    Moray Macdonald

    10/12/2021, 9:00 AM
    Asking here as #prisma1 is pretty dead. Does anyone know how to rebuild the Prisma 1 Docker image manually, rather than pulling the existing one from Docker Hub? We're trying to make Prisma 1 work on Apple Silicon.
    r
    • 2
    • 1
  • t

    Thomas Schaaf

    10/12/2021, 9:04 AM
    I am having trouble with Json filtering and am getting a typescript error. It seems to not know of the path key: https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filter-on-object-property I am using prisma 3.2.1.
    Copy code
    const worker = { id: '1' };
    
          const calls = await this.prisma.call.findMany({
            where: {
              CallEvents: {
                some: { data: { path: '$.workerId', equals: worker.id } },
              },
            },
          });
    with the error
    Copy code
    TS2322: Type '{ path: string; equals: string; }' is not assignable to type 'JsonFilter | undefined'.   Object literal may only specify known properties, and 'path' does not exist in type 'JsonFilter'.
    Bildschirmfreigabe - 2021-10-12 11:01:36 Uhr.webm
    r
    • 2
    • 2
  • s

    SKhan

    10/12/2021, 9:47 AM
    I hope its ok to ask a question more specific to Postgres than Prisma. I read this section on Prisma docs on Json support and as a postgres newbie, I am keen to learn about json (specifically jsonb) usage in postgres with Prisma. Is there any guide, more docs to refer to, for using jsonb (converting to/from etc) in postgres via Prisma?
    r
    • 2
    • 4
  • v

    Vladi Stevanovic

    10/12/2021, 11:12 AM
    ✨ 5 tips on content creation by our DevRel team ✨ 👉 https://www.instagram.com/p/CU7OmHDoGfm/
  • y

    Yaakov

    10/12/2021, 11:52 AM
    Hi, I'm trying to add Prisma to a Node/Express app using Docker compose. The container that contains the main application
    depends_on
    another container running SQL Server. Can someone please share an example of a
    Dockerfile
    that starts up Prisma as one of its steps? Thank you!
    r
    • 2
    • 2
  • a

    Andy Fang

    10/12/2021, 2:51 PM
    Hi! Will Prisma add support for realtime/graphql subscriptions anytime soon?
    r
    • 2
    • 1
  • u

    user

    10/12/2021, 4:04 PM
    Prisma Meetup #8: Davide Mauri - Prisma, TypeScript, AzureSQL, Serverless, Fullstack...oh my!

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

    An overview of a sample full-stack project to get you started with Azure Static Web Apps, Prisma, and Azure SQL to create a full-stack solution. And since you surely know Prisma and TypeScript way better than me already 😊 I’ll take the chance to tell you why you should be using Azure SQL in your next project. Azure SQL evolved tremendously over the last years, having now multi-model capabilities, columnstore support, geospatial features, in-memory and ledger table…and more! Davide Mauri is the Program Manager in the Azure SQL Database product group. Follow Davide on Twitter: @mauridb ✨ Join our Prisma Meetup group here: https://www.meetup.com/Berlin-Prisma-Meetup/ Next: 👉 Check Previous video: Full Stack Jamstack Fun -

    https://youtu.be/II3a0WyIhXs▾

  • s

    Sabin Adams

    10/12/2021, 4:50 PM
    Has anyone figured out a good way to have a multi-tenant setup with Prisma? Scoping out Prisma as a replacement for TypeORM and have a bunch of tenant DBs that all share the same schema. Looking for a decent way to switch between the db's. I feel this is a common situation so hopefully someone's figured something out!
    r
    j
    • 3
    • 5
  • m

    Mischa

    10/12/2021, 5:45 PM
    how do I do a
    LEFT JOIN
    in prisma? want to find messages without read receipts
    r
    • 2
    • 2
  • j

    Jinay Jain

    10/12/2021, 9:03 PM
    Any advice for using TypeScript with Prisma? I've gotten some basic relational types setup for my project, but I can't seem to find a way to include things like a
    count
    for this kind of type:
    Copy code
    const topicWithResources = Prisma.validator<Prisma.TopicArgs>()({
      include: {
        resources: true,
      },
    });
    
    export type TopicWithResources = Prisma.TopicGetPayload<
      typeof topicWithResources
    >;
    r
    • 2
    • 2
  • s

    Sam

    10/12/2021, 10:27 PM
    I have two projects (Site and a Discord Bot). What is the best way to use Prisma across both? I'm just starting work on my site so all of my migrations and schema etc are on the bot codebase
    r
    • 2
    • 2
  • m

    Martin Klasson

    10/12/2021, 10:42 PM
    Is there a PRISMA way to simulate
    INSERT...ON DUPLICATE KEY UPDATE
    Or do I have to go all native MYSQL for making this?
  • m

    Martin Klasson

    10/12/2021, 10:53 PM
    Ah, I guess this would be the upsertMany method, that does not exist in the Prisma CLI, only upsert ;(
    💯 1
    r
    • 2
    • 1
  • j

    Jon

    10/12/2021, 11:49 PM
    Anyone experienced in Prisma deployed on AWS and using RDS? We are looking for a very experienced dev who could jump into an issue we’re having urgently
    r
    • 2
    • 2
  • s

    Swapnil Tandel

    10/13/2021, 1:56 AM
    Hello, we are using PRISMA v1, can anybody help us on how PRISMA worker & manager scaled down and up during heavy load.
  • u

    user

    10/13/2021, 8:13 AM
    Prisma Online Meetup #8: Mike Cavaliere - Full Stack Jamstack Fun

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

    Mike will walk through building a functional Jamstack app using Next.js, Prisma, NextAuth.js, Chakra-UI, and other fun things. Mike Cavaliere has been doing full-stack web development for...a while. He’s a Senior Engineering Strategist at Echobind and author of Cut Into The Jamstack: Build and Deploy a Full-Stack Application Using React and Next.js. Follow Mike on Twitter: https://twitter.com/mcavaliere ✨ Join our Prisma Meetup group here: https://www.meetup.com/Berlin-Prisma-Meetup/ Next: 👉 Check Next video: Prisma, TypeScript, AzureSQL, Serverless, Fullstack...oh my! -

    https://youtu.be/-u2CwW40X0k▾

    👉 Check Previous video: Boosting development with Prisma & GraphQL -

    https://youtu.be/2K2yIefZSjk▾

  • y

    YeonHoPark

    10/13/2021, 8:28 AM
    hi !! User type has a relationship with Post(not null), and there is a user query that returns one User. from a nexus-generated-types.ts, the return type of the user query is a User type that does not include the posts field. any idea why it behaves this way ? is it because of the way the graphql field resolver works ?
    r
    • 2
    • 5
  • f

    Fabriece Sumuni

    10/13/2021, 8:55 AM
    How can I prevent a foreign_key from being generated while having it in the schema?
    r
    • 2
    • 2
  • a

    Alex Dekc

    10/13/2021, 10:34 AM
    🙋 Roll call! Who else is here?
    fast parrot 3
    👋 6
    prisma rainbow 3
    party postgres 3
  • u

    user

    10/13/2021, 12:03 PM
    FEDSA Meetup - Facundo Giuliani - Hybrid backend using Prisma and a Headless CMS

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

    In our web application we may have different data sources, like databases, APIs or SaaS. GraphQL gives us the possibility of consuming them in a uniform way, abstracting about the implementation. Let's talk about Prisma, an ORM that provides a query builder, and see how to join our database with a headless CMS system like Storyblok to create a hybrid backend. Then, let's see how we can manage the data of our app using GraphQL. 🛸 Speaker ------------------- 👽 Facundo Giuliani is a Developer Relations Engineer at Storyblok. From Buenos Aires, Argentina, he has more than 15 years of experience in software development. Systems Engineer. Full Stack Developer. Auth0 Ambassador. Prisma Ambassador. Cloudinary Media Developer Expert. GitKraken Ambassador. He is also an open-source contributor. Twitter: https://twitter.com/facundozurdo Personal Site: https://fgiuliani.com —————————————————— Front-end Development South Africa (https://fedsa.org) is a registered non-profit organization. It serves as an administrative umbrella for various types of projects that advance the sharing of knowledge between practitioners and aspiring practitioners within the industry. Our hope is that by encouraging South African practitioners to share their experiences more openly and honestly that we'll not only empower their peers, but that we'll also contribute to a richer, more accessible, and user-centered web experience for all South Africans. —————————————————— 📚 Learn more about Prisma • Website: https://www.prisma.io • Docs: https://www.prisma.io/docs • Quickstart: https://pris.ly/qstart —————————————————— ❓ Get help with Prisma issues • Slack: https://slack.prisma.io • GitHub: https://www.github.com/prisma/prisma/discussions • Stackoverflow: https://stackoverflow.com/questions/tagged/prisma —————————————————— 💬 Follow Prisma on social media • 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/pris... —————————————————— 🔠Professional captions for your technical videos 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 —————————————————— ✅ Subscribe to Prisma's YouTube channel https://www.youtube.com/channel/UCptAHlN1gdwD89tFM3ENb6w?sub_confirmation=1
    👀 1
  • m

    Mo El

    10/13/2021, 4:57 PM
    thoughts on this? https://github.com/prisma/prisma/issues/2505
  • m

    Mo El

    10/13/2021, 4:57 PM
    gaining a lot of attention
  • h

    Harun

    10/13/2021, 5:25 PM
    Hi guys, does anyone have a nice generic model for logging? Eg. i want to log when a user has been verified, or when a product gets disabled, even errors. I wan't to display it on the frontend also.
  • y

    Yaakov

    10/13/2021, 6:28 PM
    Hi, I'm trying to declare a
    CHECK CONSTRAINT
    in my
    schema.prisma
    file, since SQL Server doesn't support
    ENUM
    . Does anyone know how this can be accomplished? Is there a way to include raw SQL as part of the schema?
    r
    • 2
    • 4
  • j

    Jagmeet Dhillon

    10/13/2021, 6:47 PM
    Hey everyone, I am wondering how I would be able to store jpegs and pngs in the database, reason I need to do this is because the application I am working on requires full functionality in an offline environment. I declared an image variable as shown in the screenshot below and have no idea how I could read and write images to and from the database, any help would be appreciated
    ✅ 1
    a
    • 2
    • 8
  • t

    Tyler Clendenin

    10/13/2021, 7:53 PM
    During dev I am using prisma to reset the db, however my nodejs app starts getting errors
    cache lookup failed for type XXXX
    is there a programmatic way I can catch this and force Prisma to reconnect or something? as it stands i have to restart my application if this error happens
    r
    • 2
    • 2
  • b

    Blakelock Brown

    10/13/2021, 8:26 PM
    Does anyone know if it's possible to provide a dynamic table name to prisma? i.e
    prisma.variable.findMany(...)
    ?
    a
    • 2
    • 2
1...493494495...637Latest