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

    Dan

    01/06/2021, 2:02 AM
    I am also a little worried how quite this community is for a slack channel with 41,000 members….
    j
    n
    +2
    • 5
    • 29
  • v

    Ville

    01/06/2021, 10:35 AM
    Hi, what kind of limitations and downsides you've faced when using Prisma2? What is difficult or nearly impossible when using Prisma2 (and what is easier using some other DB clients?)? In what situations I need to resort to raw queries? I've tinkered some basic stuff and it seems super smooth. But for basic usage most of db clients are more or less ok, and you only realize how bad decision you have made after going beyond basic
    SELECT * FROM somewhere;
    queries. I wonder how it works in more advanced use cases and so on. I've read this: https://www.prisma.io/docs/about/limitations which is a great start but does not contain that much information.
    r
    r
    • 3
    • 9
  • n

    nikolasburk

    01/06/2021, 4:22 PM
    Hey friends 👋 I'll be live on the Apollo Twitch channel in ~45min to demonstrate how to hook up Apollo Server with Prisma! Would love to see you there 😄 https://twitter.com/apollographql/status/1346455045609582593
    🙌 5
    prisma green 2
    prisma cool 1
  • s

    Shubham Singh

    01/06/2021, 10:10 PM
    Hi I am trying to apply like preoperation on my model like if I have model like
    Copy code
    {
    a Int
    b Int 
    c Int 
    sum Int
    }
    is there any way to calculate and assign this `sum as the value of a,b,c`without applying in node js like I see in nosql data
    r
    k
    • 3
    • 5
  • h

    Harsh Makwana

    01/07/2021, 9:37 AM
    Hello, can we add enum type in @relationTable?
    type _ProductToHighlight_ @db(_name:_ "_ProductToHighlight") @relationTable {
    product: Product
    highlight: Highlight
    highlightStatus: HighlightStatus @default(_value:_ APPROVED)
    }
    r
    • 2
    • 10
  • e

    Eden Lane

    01/07/2021, 3:39 PM
    How can I select all Users which have 0 Posts?
    ✔️ 1
    r
    • 2
    • 3
  • n

    Natalia

    01/07/2021, 3:50 PM
    🤗 “What’s new in Prisma (v2.14.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 cool 3
    📺 4
  • w

    Woodbury Shortridge

    01/07/2021, 8:03 PM
    does prisma 1 cloud not work currently? If I authenticate via https://app.prisma.io/ see a flash of the UI, then just blank.
    r
    • 2
    • 5
  • h

    Harsh Makwana

    01/08/2021, 6:25 AM
    Can we add transaction rollback with graphql mutation rather than only prisma operation?
    k
    • 2
    • 1
  • d

    DimasDhimek

    01/08/2021, 12:25 PM
    Can I use raw query only in select? Like this https://sequelize.org/master/class/lib/sequelize.js~Sequelize.html#static-method-literal
    r
    • 2
    • 5
  • c

    Christian Strang

    01/08/2021, 12:42 PM
    Any way to ignore constraints when running a table truncate via
    executeRaw
    in my seed file? `Raw query failed. Code:
    0A000
    . Message: `db error: ERROR: cannot truncate a table referenced in a foreign key constraint``
    r
    • 2
    • 4
  • s

    Shubham Singh

    01/08/2021, 3:42 PM
    Is there any way in prisma where I could apply the pre operation like in mongoose where I can apply
    pre
    operation in the password etc
    r
    • 2
    • 2
  • b

    Björnstjerne Tiedemann

    01/09/2021, 1:27 AM
    I have a problem after activate groupBy:
    r
    • 2
    • 5
  • e

    Eden Lane

    01/10/2021, 9:57 AM
    I keep having this problem despite the fact I added "linux-musl" to the generator block. Can someone help, please?
    ✅ 1
    r
    • 2
    • 2
  • b

    basfl

    01/10/2021, 9:52 PM
    my prisma deploy used to work but now i get
  • b

    basfl

    01/10/2021, 9:52 PM
    Copy code
    {
      "data": {
        "generateClusterToken": null
      },
      "errors": [
        {
          "message": "No cluster could be found for workspace '*' and cluster 'default'",
          "locations": [
            {
              "line": 3,
              "column": 9
            }
          ],
          "path": [
            "generateClusterToken"
          ],
          "code": 222
        }
      ],
      "status": 200
    }
    r
    a
    • 3
    • 2
  • b

    basfl

    01/10/2021, 9:52 PM
    any idea ?
  • e

    Eddy Nguyen

    01/11/2021, 12:58 AM
    Hello everyone 👋 , based on a recent conversation with a few people in the channel, Here's a blog post about doing unit and functional testing for Prisma with Docker and Jest: https://dev.to/eddeee888/how-to-write-tests-for-prisma-with-docker-and-jest-593i Hope it helps! 🙂
    😍 2
    🤖 1
    🦜 1
    prisma rainbow 1
    💯 5
    prisma cool 1
    j
    • 2
    • 2
  • k

    Kishan Das

    01/11/2021, 5:31 AM
    Hello All, Can we add transaction rollback with graphql mutation rather than only prisma operation?
    r
    • 2
    • 1
  • j

    JakubJiricka

    01/11/2021, 9:49 AM
    Hello everyone, I am the beginner with prisma and need to integrate it with Hasura cli. I couldn't find the proper doc or any help online. Can anyone help me with this?
    r
    a
    • 3
    • 6
  • a

    Alexander Braunreuther

    01/11/2021, 9:54 AM
    Hi there, I'm getting this error
    Argument id: Got invalid value 10 on prisma.updateOneUser. Provided Int, expected String.
    when trying to update a entry an connect it's relation. Here you can find the schema and the update call. Am I doing something wrong?
    Untitled.txt
    r
    • 2
    • 7
  • b

    Brady

    01/11/2021, 5:14 PM
    Hello,
    👋 1
  • b

    Ben Liger

    01/11/2021, 6:51 PM
    I am about to upgrade fro Prisma1 to Prisma2 and am a little bit confused as to which client I should go with. I have been using
    prisma-binding
    in my backend along with
    graphql-yoga
    and would like to migrate to either
    prisma-client
    or
    nexus
    - which ever one takes the least time to upgrade to! Which of the two would people recommend?
    j
    r
    +2
    • 5
    • 7
  • h

    Hari Demirev

    01/11/2021, 8:42 PM
    👋 is there a way to add a nonstandard filter to a
    findMany
    query, besides just using a raw query for the entire thing? Specifically looking to filter a date column by a computed value, query would look like:
    Copy code
    where "startDatetime" - interval '1 minute' * "duration" > current_timestamp
    r
    • 2
    • 1
  • j

    JakubJiricka

    01/12/2021, 8:09 AM
    I am looking for someone who can help me to integrate prisma (sdl-first), graphQl into my nuxt.js project. This is paid job. If you are interested, please DM me.
  • b

    Bradly Locking

    01/12/2021, 6:02 PM
    So prisma has been renamed to prisma1 on NPM? 🤔
    m
    t
    • 3
    • 9
  • e

    Eden Lane

    01/12/2021, 11:47 PM
    Copy code
    datasource db {
      provider = "postgresql"
      url      = env("DATABASE_URL")
    }
    is it possible to read url from file? Something like
    Copy code
    url = file("/path/to/file/")
    s
    • 2
    • 5
  • a

    Austin Paquette

    01/13/2021, 2:34 AM
    Hey all, Just have a quick question, does Prisma have lifecycle hooks? Can't find anything by looking for them, there's a few references to it from the past but nothing I found was concrete (or open for that matter).
    r
    • 2
    • 5
  • s

    stephen.pearl

    01/13/2021, 2:44 PM
    What are some of the best script commands (package.json) to add to a new project (prisma2 + nexus)? I have the defaults for migrations, running server, testing and I'm sure there are some awesome shortcuts I haven't thought of yet.
    j
    • 2
    • 3
  • s

    Spencer Curry

    01/13/2021, 4:13 PM
    im working on a prisma2 graphql API. i'm currently writing my resolvers and I'm seeing a decision point and I'd love to get the community's feelings on best practices. when writing top level resolvers, I can either: 1. make a prisma call to the top-level object, then a second prisma call for each sub-resolver. Ex) users query calls to users model, then the personalProfile sub-query makes a call to the personalProfile model. 2. make a prisma call to the top-level object with includes statements for relational datapoints. sub-queries can use parent.* to get and return the relevant relational data. As I can see it, 1) results in many more database calls, but 2) results in more unrequested data with each database call. Does anyone have any experience or guidance in this area about best practices? For context, my database and prisma/graphql API are currently on different servers.
    j
    n
    • 3
    • 12
1...411412413...637Latest