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

    lewisedc

    05/29/2019, 12:32 PM
    Is it possible to save data (a row) that deletes itself after a certain amount of time say 24hours?
  • t

    taikn

    05/29/2019, 1:13 PM
    Please add the release notes for
    1.3.4
    on github 🙏
  • f

    Fitch

    05/29/2019, 7:21 PM
    uh oh .. https://www.zdnet.com/article/palo-alto-networks-announces-prisma-for-cloud-security/
    sadparrot 1
    h
    • 2
    • 1
  • a

    andrux

    05/29/2019, 8:57 PM
    can someone tell if this can’t be done in a type definition?
    Copy code
    type Message {
      id: ID! @id @unique
      text: String
      media: String
      sender: User! @relation(name: "MessageSender")
      seenBy: [User!] @relation(name: "MessageUsersSeenBy")
      deletedBy: User @relation(name: "MessageUserDeletedBy")
      deletedForAll: Boolean! @default(value: false)
      createdAt: DateTime! @createdAt
      updatedAt: DateTime! @updatedAt
    }
    I keep getting there’s an ambiguity in the relation between User and Message, I would usually just add the relation for Message in the User type but that doesn’t make sense in my schema
  • a

    andrux

    05/29/2019, 8:57 PM
    maybe there’s some other way I can get this type to work?
  • a

    andrux

    05/29/2019, 8:58 PM
    and here’s the error message I get:
    There is a relation ambiguity during the migration. Please first name the old relation on your schema. The ambiguity is on a relation between Message and User. Please name relations or change the schema in steps.
    f
    s
    h
    • 4
    • 10
  • s

    Samuel Roth

    05/29/2019, 9:07 PM
    Does Prisma’s Go library support GraphQL subscriptions?
  • a

    Alexander

    05/30/2019, 5:23 AM
    Hi everybody, i need some help. When i do the query to get bids type. i getting this error
    column Alias.estimatedAmount does not exist
    and only happen with fields that have underscore( _ ) Real example : In my database (postgres) i have a column that called estimated_amount and
    prisma instrospect
    change to estimatedAmount in datamodel. (You can look the picture). Any knows the solution ? Please help me. thanks
    h
    • 2
    • 1
  • a

    Alexander

    05/30/2019, 5:24 AM
    I am using prisma 1.26
  • h

    Heng

    05/30/2019, 6:22 AM
    Hey guys can someone pls show me the way to connect postgres db that is running in docker container with any db tool (example datagrip)?
    h
    • 2
    • 2
  • a

    Andrei Bacescu

    05/30/2019, 8:15 AM
    Hello guys! I need to validate generated ids by prisma, but I don't figure out what regex pattern would fit 100%. I know that a generated id has 25 chars length and always start with letter c. I tried a few regex patterns but none of them fit 100%. Some regex pattern I tried: 1) /^c\w{8}\d{4}\w{4}\w{8}$/g 2) /^c\w{12}\d{4}\w{8}$/g 3) /^c\w{6,24}$/g Regex pattern no. 3 is working, but I think is less restrictive. What do you thinks guys? Thanks. Later edit: I forgot to mention that I read the README file from here: https://github.com/ericelliott/cuid and regex pattern number 1 and number 2 are based on what I've read there.
    d
    k
    • 3
    • 6
  • e

    Easy

    05/30/2019, 12:40 PM
    Hello everyone, I am not able to access my server Graphql localhost by "ionic cordova run android". When I run only on the web version "ionic serve" it works normally. I have already tried configuring it in androidmanifest.xml in <network-security-config> and it did not resolve either. Can someone help me? I am very urgently concerned about this.
    • 1
    • 1
  • l

    Listi

    05/30/2019, 12:43 PM
    Hi guys, I'm trying to deploy my graphql server to AWS Lambda using Apex Up, but I got error:
    error creating handler: waiting for <http://127.0.0.1:37893> to be in listening state
    And the response is
    Copy code
    {
      "message": "Internal server error"
    }
    Anyone ever run into this problem? Please share if do 🙂 Thanks!
    s
    • 2
    • 1
  • v

    victory1908

    05/30/2019, 2:03 PM
    hi guys how to connect many to many relationship?
  • v

    victory1908

    05/30/2019, 2:03 PM
    i’m writing this resolver:
  • v

    victory1908

    05/30/2019, 2:03 PM
    Copy code
    t.field('mentionUsers', {
                type: 'Timeline',
                args: {
                    list_user_id: stringArg({list: true}),
                    timeline_id: stringArg()
                },
                resolve: (parent, { list_user_id, timeline_id }, ctx) => {
                    const userId = getUserId(ctx)
    
                    // if (ctx.prisma.timeline({id: timeline_id}).author == ctx.prisma.user({id: getUserId()})) {
                    //
                    // }
    
                    return ctx.prisma.updateTimeline({
                        where: {
                            id: timeline_id
                        },
                        data: {
                            mentions: {
                                connect: {
                                    id_in: list_user_id
                                }
                            }
                        }
                    })
                }
            })
    j
    • 2
    • 15
  • v

    victory1908

    05/30/2019, 2:04 PM
    but there is error in this line:
    id_in: list_user_id
  • m

    Matteo Villa

    05/30/2019, 2:30 PM
    hi! do prisma perform any kind of cache?
  • s

    Steven Vachon

    05/30/2019, 3:20 PM
    i am so confused by prisma
  • j

    Junsu Kim

    05/30/2019, 3:32 PM
    I want to sort the query on the server side and return it. However, it is not seen on the server side unless it is single data. For example, data such as id and name are fully outputted. However, data such as user{...}, comments{...} are not output from the server side. I want to return the alignment to the server after performing. What should I do?
  • r

    rein

    05/30/2019, 3:35 PM
    hey guys, I was wondering if these days, there is an easier way to implement full text search with prisma and a postgres db.
    e
    • 2
    • 1
  • r

    rein

    05/30/2019, 3:35 PM
    When you have, for instance, a search bar
  • s

    Steven Vachon

    05/30/2019, 3:36 PM
    why is it called "prisma-client-lib" when it's a server?
  • s

    Steven Vachon

    05/30/2019, 3:36 PM
    am i correct in that it's a client to prisma/graphql, but it's a server to my frontend app?
    t
    • 2
    • 3
  • s

    Steven Vachon

    05/30/2019, 4:22 PM
    i'm running everything in docker and unsure of what could be causing:
    prisma_1 | Server running on :4466
    node_1 | Could not connect to server at http://localhost:4466. Please check if your server is running.
    j
    v
    • 3
    • 13
  • v

    victory1908

    05/30/2019, 4:48 PM
    hi guys any suggestion for upload file (image, video) (from mobile device camera or library)?
  • j

    jdoyle112

    05/30/2019, 5:50 PM
    Does anyone know if it’s possible to define a custom payload type for query resolvers
  • j

    jdoyle112

    05/30/2019, 5:51 PM
    What I want to do is combine two queries into one.. so I want the return payload to be an object containing two objects
  • j

    jdoyle112

    05/30/2019, 5:51 PM
    For example.. type MenuPayload { menu: ActiveMenu! categories: [Category!]! }
    e
    • 2
    • 2
  • a

    Armaan Dhanji

    05/30/2019, 6:01 PM
    What is the best bang-for-your-buck cloud hosting provider for a full stack web application using Prisma and backed by Postgresql? (considering google cloud, heroku, digital ocean, AWS...but not sure which to go with)
    e
    a
    d
    • 4
    • 5
1...273274275...637Latest