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

    Taylor

    05/26/2021, 5:35 PM
    Hey guys!!!
  • t

    Taylor

    05/26/2021, 5:35 PM
    Anyone know why in production environment I'm getting "SyntaxError: Failed to construct 'WebSocket': The URL 'undefined' is invalid." with Prisma subscriptions set-up
    j
    • 2
    • 6
  • d

    Daniil

    05/26/2021, 9:44 PM
    hey guys! does anyone know if that's an expected behaviour for prisma client? we have a DateTime field in schema and when we query the object - the field is not actually date, but a plain iso string i.e. when used with *.getTime() it fails with getTime is not a function
    r
    • 2
    • 1
  • b

    Bollo Omar

    05/26/2021, 9:46 PM
    Hello guys. Can anyone help me resolve this.
    j
    • 2
    • 2
  • v

    Victor Björklund

    05/27/2021, 7:27 AM
    How would you structure a tree structure with prisma? Planing to build a todo app with N-depth. So the depth is not known before. There is no limit on how many levels. So: • Task ◦ Task ◦ task ▪︎ Task • task • task • task Probably will use sqlite for database.
    r
    • 2
    • 2
  • p

    Pedro

    05/27/2021, 11:29 AM
    hi, do I need to install VirtualBox to install the Prisma 1 client?
    r
    • 2
    • 18
  • j

    John Cantrell

    05/27/2021, 2:03 PM
    if I have two models Project and Task and want to fetch projects but order them based on the most recently updated task in each project, is this possible?
    d
    r
    • 3
    • 12
  • m

    Mitchell Amihod

    05/27/2021, 3:11 PM
    Hi. I get this warning when i run prisma generate
    warn Versions of prisma@2.23.0 and @prisma/client@2.22.1 don't match.
    but i dont have 2.23 installed. My npm lock file is
    "@prisma/client": "^2.22.1",
    and i use
    npm ci
    I cant find prisma 2.23 anywhere in my package lock file. Anyone have any idea why would be getting this warning?
    r
    • 2
    • 13
  • m

    Mitchell Amihod

    05/27/2021, 3:11 PM
    i deleted my node_modules and reran
    npm ci
  • m

    Mitchell Amihod

    05/27/2021, 3:15 PM
    nm… found the answer.. its the prisma `*“peerDependencies”: {* *“prisma”: “*”* },`
  • m

    Mitchell Amihod

    05/27/2021, 3:15 PM
    🤦‍♂️
  • m

    Mitchell Amihod

    05/27/2021, 3:15 PM
    any idea why the client doesnt lock its version to the compatible one instead of * ? (ooc)
  • n

    Natalia

    05/27/2021, 3:56 PM
    First edition of our new meetup, Connect Dev Africa, is starting in 5 minutes! fast parrot Tune in here:

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

    🌍 5
    🦜 5
  • m

    Mykyta Machekhin

    05/27/2021, 5:07 PM
    Hello Are u planing add
    upsertMany
    method in future?
    r
    • 2
    • 1
  • b

    Bryan

    05/27/2021, 6:08 PM
    Is there any way for prisma to report the details when a drift is detected? It seems to me if prisma has an issue it should be able to report the problems so I can fix them.
    Drift detected: Your database schema is not in sync with your migration history.
    Is just doing a schema diff in my db the best way to resolve this?
    r
    • 2
    • 2
  • n

    Niko Guerra

    05/27/2021, 10:09 PM
    Does prisma
    $queryRaw
    not support
    CREATE TEMPORARY TABLE
    statements yet? Received this and was wondering if it was not supported or if it was me and I have to get creative (For MySQL)
    Copy code
    {
      "code": "P2010",
      "clientVersion": "2.22.0",
      "meta": {
        "code": "1295",
        "message": "This command is not supported in the prepared statement protocol yet"
      }
    }
    n
    • 2
    • 1
  • p

    Pedro

    05/28/2021, 10:35 AM
    Hi, when I change my datamodel do I need to do anything else besides deploy and generate? Because my changes aren't being reflected in http://localhost:4466/_admin
    r
    f
    j
    • 4
    • 14
  • p

    Pedro

    05/28/2021, 10:36 AM
    (prisma 1)
  • j

    janpio

    05/28/2021, 2:29 PM
    set the channel topic: General Discussions about Prisma (2) [Looking for Prisma 1? Join the #prisma1 channel!]
    prisma rainbow 2
    🚀 4
  • v

    Vigan Zeqiri

    05/28/2021, 2:44 PM
    when overriding programmatically the data source url, do i need to delete the datasource in
    schema.prisma
    ? If i do so, migrations are not working, even if i leave that the env var does not exist
    j
    m
    • 3
    • 15
  • j

    Jared Salzano

    05/28/2021, 4:44 PM
    What is prisma’s DateTime type in Javascript? How do I post a new value into that field
    g
    r
    • 3
    • 6
  • t

    Tharshan

    05/28/2021, 7:23 PM
    Prisma does not seem to detect when we rename a reverse relationship field name
    j
    • 2
    • 30
  • t

    Tharshan

    05/28/2021, 7:23 PM
    Any idea why this might happen?
  • s

    Slackbot

    05/28/2021, 9:31 PM
    This message was deleted.
    j
    c
    • 3
    • 2
  • k

    Kerem Kazan

    05/28/2021, 10:57 PM
    is there a way to hook into generated prisma types to customize them? in a way similar to nexus source types? link: https://nexusjs.org/docs/guides/source-types
    r
    • 2
    • 5
  • y

    yoenho park

    05/29/2021, 7:40 AM
    Hi ! How do you argument validation check when developing graphql api with nexus ? can you recommend a library ?
    a
    • 2
    • 2
  • v

    Vignesh

    05/29/2021, 12:01 PM
    How to mention what type of joins to be used in relation queries? Let's say i want a left join here
    Copy code
    const getUser = await prisma.user.findUnique({
      where: {
        id: 19,
      },
      include: {
        posts: true,
      },
    })
    r
    • 2
    • 2
  • i

    Ibad Shaikh

    05/29/2021, 12:36 PM
    Hi 👋 I have a use case in which I want average rating of each user in my db. I have three models : • User • Post • Rating A user have multiple posts and each post have multiple ratings given by many users. I want to gather average rating of each user. I have user_id in Post model and post_id in Rating model. How is it possible to do so? I was using
    groupBy
    but it only involves a single model & gives the average of a particular field. But in my case the situation is little different. Anyone who can guide me.
    c
    • 2
    • 1
  • p

    Paul

    05/29/2021, 4:40 PM
    Hey all. Is there any plans for Scalar list filters for mysql?
  • p

    Paul

    05/29/2021, 4:41 PM
    I could have sworn something like:
    Copy code
    where: {
      foo: {
        in: ["abc", "def"]
      }
    }
    Was possible.
1...435436437...637Latest