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

    Giorgio Delgado

    04/03/2020, 2:02 PM
    Hey everyone, I keep getting 404 when reading through the prisma1 docs. Is there an alternate place to read the docs?
    r
    • 2
    • 2
  • r

    roberto.guerra

    04/03/2020, 6:18 PM
    Does anyone have any examples of using schemas generated with prisma and non-prisma schemas in the same project? I'm having an issue with the generated nexus-prisma file..... where
    core.NexusArgDef
    seems to bring along the types defined for the other schema.
  • r

    roberto.guerra

    04/03/2020, 6:30 PM
    nvm
  • r

    Ranjan Purbey

    04/03/2020, 9:18 PM
    Since migrate is still in experimental phase, how does a typical workflow using introspection look like? Let's say I use
    sequelize-cli
    for managing my database migrations. After running a migrations, when I introspect the database, all the changes that were manually made into the
    schema.prisma
    file are lost. I understand that before inspecting we can take a backup of the original schema, and in the freshly generated schema copy-paste the manual changes from the backup. But his setup doesn't seem ideal and is error-prone. Is there a better way to do this?
    j
    • 2
    • 7
  • e

    El-Hussein Abdelraouf

    04/03/2020, 9:30 PM
    Can i use prisma migrate in a non node project just to manage database deployment ?
    r
    • 2
    • 2
  • p

    Pavlo Strunkin

    04/03/2020, 10:02 PM
    Hi guys! I'm trying dockerize project and started with creating image that gonna start postgresql and apply migrations but keep getting strange error docker-compose.yml
    Copy code
    version: '3.3'
    services:
      postgres:
        image: postgres
        restart: always
        environment:
          POSTGRES_USER: prisma
          POSTGRES_PASSWORD: prisma
          POSTGRES_DB: prisma
        ports:
          - '5432:5432'
        expose:
          - '5432'
        volumes:
          - postgres:/var/lib/postgresql/data
      migration:
        build: .
        depends_on: 
          - postgres
        environment: 
          VK_DATABASE: <postgresql://prisma>:prisma@localhost:5432/prisma
          POSTGRES_SERVER: postgres
          POSTGRES_PORT: 5432
    volumes:
      postgres:
    Dockerfile
    Copy code
    FROM node:latest
    
    RUN npm install -g @prisma/cli
    
    ADD "<https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh>" /wait-for-it.sh
    RUN chmod +xr /wait-for-it.sh
    
    COPY schema.prisma /schema.prisma
    COPY migrations/ /migrations/
    
    COPY entrypoint.sh /entrypoint.sh
    RUN chmod +x /entrypoint.sh
    
    ENTRYPOINT ["/entrypoint.sh"]
    CMD ["up"]
    entrypoint.sh
    Copy code
    #!/bin/sh
    exec /wait-for-it.sh $POSTGRES_SERVER:$POSTGRES_PORT -- npx prisma migrate up --experimental
    the error
    Copy code
    Error: Could not find query-engine binary. Searched in /usr/local/lib/node_modules/@prisma/cli/query-engine-debian-openssl-1.1.x and /usr/local/lib/node_modules/@prisma/query-engine-debian-openssl-1.1.x
    workaround from here didn't help https://github.com/prisma/prisma/issues/1642 who knows what this might be?
    r
    r
    • 3
    • 8
  • j

    Jeremy

    04/04/2020, 3:13 AM
    👋 Have been trying out Prisma and really enjoying it so far compared to my Sequelize and GraphQL projects. As a Junior im currently struggling with hosting my Prisma/GraphQL yoga server - I’ve deployed it to Netlify and have working Netlify functions but unsure how to get the graphql endpoint o.o ~ If anyone knows any resources for this I would love to know 🙂
  • p

    Pavlo Strunkin

    04/04/2020, 10:27 AM
    Hi guys! In docker or in CI as well when I try to apply migrations it get's me into interactive mode asking whether to create new DB how to make this auto approve? this is not working
    Copy code
    prisma migrate up --experimental --auto-approve
    any other flags or workarounds you use for that cases?
    • 1
    • 1
  • s

    Slackbot

    04/04/2020, 11:18 AM
    This message was deleted.
    j
    • 2
    • 1
  • k

    khareta

    04/04/2020, 1:23 PM
    Anybody remembers how to generate schema using prisma 1.13 ???
  • g

    Giorgio Delgado

    04/04/2020, 4:22 PM
    Hey friends, how should I think about breaking changes to the db in the context of
    prisma deploy
    ? Are there subtleties around prisma data models that would lead to non backwards-compatible changes in the database? It's obvious that if you change the type of a field in prisma from say
    Int
    to
    String
    then you're going to get a breaking change. But i am asking about other more subtle situations that I may not be aware of.
  • g

    Giorgio Delgado

    04/04/2020, 4:25 PM
    For context, the reason I ask this is that I may want to set up blue green deployments, but with only one database
  • g

    Giorgio Delgado

    04/04/2020, 4:25 PM
    so if i run
    prisma deploy
    then there is concern that i am introducing a breaking change on a live application
  • t

    Taylor

    04/04/2020, 7:12 PM
    Is anyone good at deploying apps to production and would be willing to teach me how to do it with my app?
  • t

    Taylor

    04/04/2020, 7:12 PM
    I would be happpy to pay an hourly rate!
  • t

    Taylor

    04/04/2020, 7:12 PM
    contact me at taylor@digitalspeed.co.uk
  • i

    iandjx

    04/05/2020, 3:35 AM
    What is the recommended library for having my server fetch data from a 3rd party graphql API? Apollo Client?
    • 1
    • 1
  • t

    Taylor

    04/05/2020, 10:47 AM
    Hey guys anyone there?
  • t

    Taylor

    04/05/2020, 10:48 AM
    Just posted a question on Reddit. Would love some help if you are familiar with React.js >>https://www.reddit.com/r/reactjs/comments/fvbvlr/best_way_to_restrict_access_if_not_logged_in/
  • p

    Paul

    04/05/2020, 1:31 PM
    Hi, I'm trying to run this example: https://github.com/prisma/prisma-examples/tree/master/typescript/graphql-apollo-server. package.json provides those scripts:
    Copy code
    ...
      "scripts": {
        "start": "node dist/server",
        "clean": "rm -rf dist",
        "build": "npm -s run clean && npm -s run generate && tsc",
        "generate": "npm -s run generate:prisma && npm -s run generate:nexus",
        "generate:prisma": "prisma generate",
        "generate:nexus": "ts-node --transpile-only src/schema",
        "postinstall": "npm -s run generate",
        "dev": "ts-node-dev --no-notify --respawn --transpileOnly src/server"
      }
    ...
    When I run "D:\Work\Grey Wolves\project-box-api> npm run generate" I get this error:
    Copy code
    > typescript-graphql@ generate D:\Work\Grey Wolves\gympack-box-api
    > npm -s run generate:prisma && npm -s run generate:nexus
    
    'D:\Work\Grey' is not recognized as an internal or external command,
    operable program or batch file.
    I guess the issue is in a spacebar in "Grey Wolves". Running on windows, and ideas on this?
    r
    • 2
    • 5
  • g

    Giorgio Delgado

    04/05/2020, 3:16 PM
    I keep hitting connection limits on a hobby db with the prisma1 server. If I don't explicitly set a connection limit, how many connections does prisma create by default?
  • g

    Giorgio Delgado

    04/05/2020, 3:18 PM
    https://github.com/prisma/prisma1/blob/7a7ea739eb6125b6fe598a43505f872a81856f95/server/connectors/api-connector-postgres/src/main/scala/com/prisma/api/connector/postgres/PostgresDatabasesFactory.scala
  • g

    Giorgio Delgado

    04/05/2020, 3:19 PM
    Looks like 10 from this file (i am using psql) ... This is odd because when i run
    prisma deploy
    i still hit connection limts even though I have 15 alloted connections with my psql db
  • g

    Giorgio Delgado

    04/05/2020, 3:20 PM
    I even set
    connectionLimit
    to 7 in my prisma config too
  • t

    Taylor

    04/05/2020, 7:21 PM
    Hey alll realy not a big fan of that fact ALL docs have been removed other than 2.0!
    👍 2
    h
    n
    +2
    • 5
    • 4
  • t

    Taylor

    04/05/2020, 7:21 PM
    Also, quic question, does anyone know if it's possible to upsert nested types?
  • t

    Taylor

    04/05/2020, 7:36 PM
    Nevermind, my data wasn't displaying and after checking the DB it has been working all along 🤦🏻‍♂️
  • p

    Peter Vive

    04/05/2020, 8:26 PM
    Hey - has anyone been succesful in bundling prisma-client with webpack?
    b
    s
    • 3
    • 3
  • m

    Marcel

    04/05/2020, 9:13 PM
    It seems like there is not really a focus on golang anymore... is my observation right? So will there even be a beta-ready version for go this year?
    j
    l
    • 3
    • 3
  • a

    Adriano Resende

    04/06/2020, 12:32 AM
    💡 Feedback (I don’t know if it is possible) Wouldn’t that be a good idea? A value unique.
    Copy code
    enum Role {
      OWNER @unique
      ADMIN
      USER
    }
    j
    • 2
    • 1
1...360361362...637Latest