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

    Michael Aubry

    07/23/2020, 9:49 PM
    Hey are there any good resources around Prisma 2 and getting user based on tokens?
    b
    r
    • 3
    • 9
  • m

    Michael Aubry

    07/24/2020, 12:29 AM
    Does sql not support many-to-many relationships? If so, when I export my data from graph.cool the many-to-many are lost. Is there an easy workaround?
  • m

    Michael Aubry

    07/24/2020, 12:53 AM
    Many-to-many: Use a junction table (example) - Seems like this is the solution but the graph.cool sql doesnt follow this format.
    j
    k
    • 3
    • 6
  • s

    Slackbot

    07/24/2020, 4:07 PM
    This message was deleted.
    b
    • 2
    • 2
  • a

    Ashiqur Rahman

    07/24/2020, 4:27 PM
    Copy code
    volumes:
          - /bitnami/postgresql
    what is the best way to set volume? may be there is a chance of data loss by using above code
  • m

    Manthan Mallikarjun

    07/25/2020, 2:10 AM
    Anyone here use Nexus? For some reason I’m not getting type signatures:
    a
    m
    • 3
    • 24
  • k

    Karan

    07/25/2020, 5:32 AM
    https://github.com/prisma/prisma/issues/3069 Did anyone else facing this issue??
  • m

    Mike Dietz

    07/25/2020, 9:33 PM
    Hi, I am trying to do some introspection with 'npx prisma introspect' but I get the error message TypeError: Cannot read property 'startsWith' of undefined. Any ideas how to solve this issue?
    j
    • 2
    • 8
  • m

    Manthan Mallikarjun

    07/25/2020, 9:49 PM
    Hmmm I feel like the prisma 2 migration system is sort of flaky
    j
    • 2
    • 5
  • m

    Munkhtegsh Munkhbat

    07/25/2020, 10:43 PM
    Hey guys, Auto-Completion feature stops working when I pass PrismaCient as prisma to Context in the GrahQL-Yoga server. How did you go around this issue?
    Copy code
    const { PrismaClient } = require('@prisma/client')
    const prisma = new PrismaClient()
    
    const server = new GraphQLServer({
      typeDefs: './src/schema.graphql',
      resolvers,
      context: {
        prisma,
      }
    })
    https://www.howtographql.com/graphql-js/5-connecting-server-and-database/
    r
    • 2
    • 5
  • m

    Manthan Mallikarjun

    07/26/2020, 6:43 AM
    I had no idea nexus was made by prisma
  • y

    Yerlan

    07/26/2020, 7:57 AM
    Hi guys, when updating an instance, how I should check it for existence? For ex:
    Copy code
    await this.client.movieList.update({
          where: { id: parseInt(listId) },
          data: {
            movies: {
              delete: { id: parseInt(movieId) },
            },
          },
        });
    In this case, if movieList doesn't contain movie with id=movieId, It's throwing error
    r
    s
    r
    • 4
    • 5
  • j

    Jan Wilhelm

    07/26/2020, 10:23 AM
    Quick question, why are there 38k people in this workspace with mostly very cryptic names that seem like they’re bots? Or am I just mistaken?
    j
    • 2
    • 3
  • a

    Awey

    07/26/2020, 4:00 PM
    Any React/Apollo devs here that can help teach me Authentication/Authorization? I would like to learn how to set it up so that it's production ready. Email/password login, protected routes, roles, etc. Please I could really use the help.
    l
    r
    • 3
    • 22
  • a

    Awey

    07/27/2020, 2:52 AM
    Has anyone here ever used firebase authentication with prisma?
    s
    • 2
    • 1
  • w

    Warren Day

    07/27/2020, 8:39 AM
    No reason the two wouldn't work. Prisma has no concern with authenticated so you can use anything.
    💯 1
  • s

    Sachin Jangid

    07/27/2020, 9:11 AM
    Hi Everyone! I was having issues with my PrismaDB connectivity.
    r
    • 2
    • 2
  • e

    Errorname

    07/27/2020, 10:30 AM
    Hi everyone 👋 I just released the v2.2.0 of Prisma-multi-tenant, which now has plugins for Nexus and Blitz, as well as lot of documentation on how to add multi-tenancy to your apps! Don’t hesitate to check it out 🙂
    prisma cool 5
    😎 3
    fast parrot 6
    prisma rainbow 8
    🔥 3
    🎉 4
  • a

    Ashwin Kudva

    07/27/2020, 4:11 PM
    Hi guys, quick question - I have access to a database in a MySQL box that I want to have Prisma introspecting/connecting to, but don't have access to make new databases. However, it seems as though Prisma needs to make a new database called 'prisma' to store its metadata. Is there any way to change this or redirect the tables it needs to create to the database I do have access to?
    r
    r
    • 3
    • 13
  • v

    vnadygin

    07/27/2020, 5:31 PM
    Hey. Just a quick question. I am rewriting a Postgres DB to make it working nice with prisma 2. I am trying to create self m to m relation. Based on documentation: https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-schema/relations#many-to-many-self-relations But I’ve got an warning from CLI:
    Copy code
    These models do not have a unique identifier or id and are therefore commented out.
    • "UserFollows"
    And my generated schema doesn’t looks right:
    Copy code
    // The underlying table does not contain a unique identifier and can therefore currently not be handled.
    // model UserFollows {
      // A                         String
      // B                         String
      // User_UserTo_UserFollows_A User   @relation("UserTo_UserFollows_A", fields: [A], references: [id])
      // User_UserTo_UserFollows_B User   @relation("UserTo_UserFollows_B", fields: [B], references: [id])
    
      // @@map("_UserFollows")
    // }
    So that is the correct way to implement self many to many relation?
    j
    • 2
    • 1
  • s

    Suhail

    07/28/2020, 3:42 AM
    Hi. I am getting the following error from prisma very often now. I am using
    prisma1
    +
    mongo
    Copy code
    GraphQL Error: {
      "0": "<",
      "1": "h",
      "2": "t",
      "3": "m",
      "4": "l",
      "5": ">",
      "6": "\r",
      "7": "\n",
      "8": "<",
      "9": "h",
      "10": "e",
      "11": "a",
      "12": "d",
      "13": ">",
      "14": "<",
      "15": "t",
      "16": "i",
      "17": "t",
      "18": "l",
      "19": "e",
      "20": ">",
      "21": "5",
      "22": "0",
      "23": "2",
      "24": " ",
      "25": "B",
      "26": "a",
      "27": "d",
      "28": " ",
      "29": "G",
      "30": "a",
      "31": "t",
      "32": "e",
      "33": "w",
      "34": "a",
      "35": "y",
      "36": "<",
      "37": "/",
      "38": "t",
      "39": "i",
      "40": "t",
      "41": "l",
      "42": "e",
      "43": ">",
      "44": "<",
      "45": "/",
      "46": "h",
      "47": "e",
      "48": "a",
      "49": "d",
      "50": ">",
      "51": "\r",
      "52": "\n",
      "53": "<",
      "54": "b",
      "55": "o",
      "56": "d",
      "57": "y",
      "58": " ",
      "59": "b",
      "60": "g",
      "61": "c",
      "62": "o",
      "63": "l",
      "64": "o",
      "65": "r",
      "66": "=",
      "67": "\"",
      "68": "w",
      "69": "h",
      "70": "i",
      "71": "t",
      "72": "e",
      "73": "\"",
      "74": ">",
      "75": "\r",
      "76": "\n",
      "77": "<",
      "78": "c",
      "79": "e",
      "80": "n",
      "81": "t",
      "82": "e",
      "83": "r",
      "84": ">",
      "85": "<",
      "86": "h",
      "87": "1",
      "88": ">",
      "89": "5",
      "90": "0",
      "91": "2",
      "92": " ",
      "93": "B",
      "94": "a",
      "95": "d",
      "96": " ",
      "97": "G",
      "98": "a",
      "99": "t",
      "100": "e",
      "101": "w",
      "102": "a",
      "103": "y",
      "104": "<",
      "105": "/",
      "106": "h",
      "107": "1",
      "108": ">",
      "109": "<",
      "110": "/",
      "111": "c",
      "112": "e",
      "113": "n",
      "114": "t",
      "115": "e",
      "116": "r",
      "117": ">",
      "118": "\r",
      "119": "\n",
      "120": "<",
      "121": "h",
      "122": "r",
      "123": ">",
      "124": "<",
      "125": "c",
      "126": "e",
      "127": "n",
      "128": "t",
      "129": "e",
      "130": "r",
      "131": ">",
      "132": "n",
      "133": "g",
      "134": "i",
      "135": "n",
      "136": "x",
      "137": "/",
      "138": "1",
      "139": ".",
      "140": "1",
      "141": "4",
      "142": ".",
      "143": "0",
      "144": " ",
      "145": "(",
      "146": "U",
      "147": "b",
      "148": "u",
      "149": "n",
      "150": "t",
      "151": "u",
      "152": ")",
      "153": "<",
      "154": "/",
      "155": "c",
      "156": "e",
      "157": "n",
      "158": "t",
      "159": "e",
      "160": "r",
      "161": ">",
      "162": "\r",
      "163": "\n",
      "164": "<",
      "165": "/",
      "166": "b",
      "167": "o",
      "168": "d",
      "169": "y",
      "170": ">",
      "171": "\r",
      "172": "\n",
      "173": "<",
      "174": "/",
      "175": "h",
      "176": "t",
      "177": "m",
      "178": "l",
      "179": ">",
      "180": "\r",
      "181": "\n",
      "status": 502
    }
    I am stuck here.
  • s

    Suhail

    07/28/2020, 3:42 AM
    What could be the reason?
  • s

    Suhail

    07/28/2020, 3:42 AM
    If I wait, half an hour, and send no query, this error would usually go away.
  • s

    Suhail

    07/28/2020, 3:48 AM
    What is it that I am missing? Any configuration that I need to make?
  • s

    Suhail

    07/28/2020, 5:19 AM
    I have opened up an issue I am facing very often with
    Prisma
    at https://github.com/prisma/prisma/issues/3156. I get this error
    Closed connection [connectionId{localValue:100, serverValue:505819}] to 122.42.142.32:27017 because there was a socket exception raised by this connection.
    and
    java.lang.OutOfMemoryError: Java heap space
    very often. Could anyone help here?
    j
    • 2
    • 3
  • e

    Etel

    07/28/2020, 4:41 PM
    @Daniel Norman is currently live presenting “Building a modern backend with TypeScript, PostgreSQL and Prisma”. Check it out:

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

    Here’s the description:
    Copy code
    The goal of the live-stream series is to explore different patterns and architectures for modern backends with Prisma. 
    
    Prisma Client is an autogenerated type-safe database client for Node.js (ORM replacement). 
    
    The series will focus on the role of the database in every aspect of backend development including data modeling, the API layer, validation, authentication, authorization, and deployment. 
    
    In this first stream, we will start with data modeling, CRUD operations, and aggregations for a real-world problem.
    prisma rainbow 5
    📺 6
    👀 3
    prisma cool 4
  • r

    ryan

    07/28/2020, 7:19 PM
    hi all! doing a livestream right now with Chris Sevilleja on setting up a Prisma app with a database hosted on DigitalOcean 🙂 https://www.twitch.tv/chrisoncode
    prisma green 1
    👍 2
  • m

    martin

    07/28/2020, 7:34 PM
    Silly question, for
    Prisma Client
    how do I filter records that have at least one relation? E.g.
    event
    that has 1 or more active
    registrations
    ? I thought of using
    some: { … }
    but that technically is a specific filter (e.g. if a registration is paid or not) rather than a general filter (e.g. if an event has any registrations to begin with).
    Copy code
    const events = await prisma.event.findMany({
      where: {
        { registrations: { ... } }
      }
    })
    r
    • 2
    • 6
  • a

    Alvin Khaled

    07/28/2020, 9:25 PM
    Has anyone here created a relay/connection-compatible API using Prisma and Nexus? I would love any advice offered, especially around querying and mutating connection edges.
    r
    • 2
    • 6
  • j

    Juan Garcia

    07/29/2020, 1:39 AM
    I accidentally delete the prisma project that contained the prisma.yml, and its no where to be found in trash. Is there a way to that file again?
    b
    • 2
    • 3
1...388389390...637Latest