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

    Philipp

    05/27/2020, 4:51 PM
    Hi there, do you have any hint for me how to increase the maximum java heap size via
    prisma-server.yml
    or
    Dockerfile
    ? It seems the current maximum is 2GB, but the server has 4GB available. Didn't find any solution so far, thanks šŸ™‚
    p
    r
    • 3
    • 5
  • s

    sourabh

    05/28/2020, 3:16 AM
    Hi I am trying to generate Prisma schema from example
    Copy code
    npx prisma migrate save --name init --experimental command
    I am getting following error
    Copy code
    Error: Can't parse migration engine response:
    undefined
    can someone help ?
  • s

    sourabh

    05/28/2020, 3:17 AM
    I added simple model User in schema from the example itself
  • b

    bob

    05/28/2020, 4:11 AM
    What am i doing wrong in this resolver? (ie, what is the right answer)
    Copy code
    return context.prisma.users({
        where: { trips: {in: parent.id} },
      });
    
    type User {
      id: ID!
      uid: String!
      name: String!
      email: String!
      gender: String
      trips: [Trip!]
    }
    r
    r
    • 3
    • 2
  • b

    bob

    05/28/2020, 4:29 AM
    context.prisma.users() works, but when i put the where filter on it, it starts to freak out
  • b

    bob

    05/28/2020, 4:41 AM
    Reason: 'trips' Field 'trips' is not defined in the input type 'UserWhereInput'
  • b

    bob

    05/28/2020, 5:28 AM
    Copy code
    ERROR: There is a relation ambiguity during the migration. Please first name the old relation 
    on your schema. The ambiguity is on a relation between Trip and User. Please name relations or change the schema in steps.
    r
    • 2
    • 2
  • b

    bob

    05/28/2020, 5:28 AM
    Copy code
    type User {
        id: ID! @id
        uid: String! @unique
        createdAt: DateTime @createdAt
        name: String
        email: String @unique
        gender: String
        trips: [Trip] @relation(name: "TravelerRelation")
        createdTrips: [Trip] @relation(name: "TripOwner" onDelete: CASCADE)
    }
    
    type Trip {
        id: ID! @id
        createdAt: DateTime @createdAt
        invitationLink: String @unique
        name: String!
        location: String
        arivalDay: DateTime
        departureDay: DateTime
        user: User! @relation(name: "TripOwner")
        travelers: [User!] @relation(name: "TravelerRelation")
        activities: [Activity]
        packingLists: [PackingList!] @relation(onDelete: CASCADE)
    }
  • b

    bob

    05/28/2020, 5:28 AM
    i am completely at a loss here...
  • b

    bob

    05/28/2020, 5:33 AM
    what im trying to do is to return a list of users that have a
    trip
    in their
    trips
    list with a certain ID
    h
    • 2
    • 1
  • b

    bob

    05/28/2020, 6:37 AM
    do i need to make a pivot table?
  • a

    Ashiqur Rahman

    05/28/2020, 10:09 AM
    How can I order posts in desc or asc order in prisma 2?
    Copy code
    prisma.post.findMany();
    r
    • 2
    • 1
  • a

    Abhischek

    05/28/2020, 11:57 AM
    Is there a way to access environment variables defined in
    prisma.yml
    via the prisma client? I'm writing a test using jest and want to make sure the test never runs against a real mongo environment
    r
    • 2
    • 2
  • b

    bob

    05/28/2020, 12:18 PM
    say how do i update an array field that references another type ?
    r
    • 2
    • 7
  • m

    Matheus Assis

    05/28/2020, 1:37 PM
    Is it possible, with prisma 2 or
    @nexus/schema
    , to "intercept" every time an update is done to the database? I'm looking at how to implement algolia, and looks like I have to call an sdk to push to them. Is there a way of "listening" when changes are done to the database by prisma+nexus? Or adding a callback for every prisma or nexus call? Something to "hook" that?
    r
    • 2
    • 4
  • a

    Ashiqur Rahman

    05/28/2020, 1:49 PM
    How can I implement this (cascade Delete) on prisma2's
    schema.prisma
    file?
    Copy code
    type Post {
      id: ID! @unique
      comments: [Comment!]! @relation(name: "CommentToPost", onDelete: CASCADE)
      updatedAt: DateTime!
      createdAt: DateTime!
    }
    r
    a
    • 3
    • 2
  • h

    henke

    05/28/2020, 8:05 PM
    hi, I would like to implement a feature
  • h

    henke

    05/28/2020, 8:05 PM
    more specifically this one: https://github.com/prisma/prisma/issues/1924
  • h

    henke

    05/28/2020, 8:05 PM
    I would like to know where should I start
  • h

    henke

    05/28/2020, 8:05 PM
    with the prisma-client in TS or the prisma-engine in Rust
  • h

    henke

    05/28/2020, 8:05 PM
    or if I have to change both projects
  • h

    henke

    05/28/2020, 8:06 PM
    if someone could guide me a little bit, it would be awesome 😊
  • j

    James Fox

    05/29/2020, 1:03 AM
    Does anyone know if Postgres v12 is supported yet? Im testing it locally with a schema that works on v11 and getting an error in PGAdmin that ā€œstring indices must be integersā€. The
    prisma migrate up --experimental
    command executed fine
    • 1
    • 2
  • s

    Slackbot

    05/29/2020, 9:20 AM
    This message was deleted.
    r
    h
    • 3
    • 6
  • k

    Kaspar Naaber

    05/29/2020, 10:31 AM
    Hello! Is there a plugin for VSCode and/or IntelliJ that supports .prisma files for prisma v1?
    r
    • 2
    • 2
  • w

    Warren Day

    05/29/2020, 10:48 AM
    The official plugin should do the job, although it may have been updated to handle the newer syntax https://marketplace.visualstudio.com/items?itemName=Prisma.prisma
  • k

    Kaspar Naaber

    05/29/2020, 10:58 AM
    Thanks, but as I understand this indeed validates the newer syntax which is not compatible with Prisma v1
  • w

    Warren Day

    05/29/2020, 1:33 PM
    You could try to install an older version of the extension https://github.com/microsoft/vscode/issues/12764#issuecomment-442370545
    šŸ’Æ 1
    r
    k
    • 3
    • 3
  • s

    Samrith Shankar

    05/30/2020, 1:31 AM
    Guys, a sincere request. Please pull down the nexus.js.org website. Whenever I search for Nexus, that website shows up. It’s confusing as hell.
    šŸ‘ 1
    a
    r
    • 3
    • 3
  • v

    Vignesh

    05/30/2020, 5:24 AM
    Hi My docker-compose.yml configuration looks like this by default. PRISMA_CONFIG: | port: 4466 databases: default: connector: postgres host: XXXXXXXXXXXX database: XXXXXXXXXX schema: public user: XXXXXXXXXXXXXXX password: XXXXXXXXXXXXX ssl: true rawAccess: true port: '5432' migrations: true Here by default the schema mentioned is public. For localhost:4466 - it puts everything in public. Now I have created a new endpoint like localhost:4466/xxx - Now when I try to create user it fails to create new schema in postgres. How to handle this?
    r
    • 2
    • 2
1...377378379...637Latest