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

    Omri Bitan

    02/26/2020, 11:09 PM
    Hi everyone! nice to meet you all! I'm new to Prisma. I've made changes (rewrote all my data models) and deployed prisma. The
    Prisma Admin
    seems give me errors. It looks like it is trying to query some of the fields I've deleted.. I've tried:
    prisma delete
    prisma reset
    any suggestions? Thanks
    s
    • 2
    • 3
  • a

    Alex Vilchis

    02/27/2020, 12:41 AM
    Hello, has anyone implemented authentication using nexus-prisma? I am having trouble by “protecting” the crud operations but leaving the
    login
    and
    signup
    operations public. Does anyone have an example?
    s
    • 2
    • 1
  • g

    Grant Plaster

    02/27/2020, 2:09 AM
    Hello, trying to resolve an issue I'm running into when loading up a service I have running on the portal. It's on prisma-us1 server and says Healthy status and 0 requests in the last hour, but I've tried multiple times last night and throughout today when I click on my service it fails to load my data on the Prisma Admin tab it just shows the spinner indefinitely and the following error in the console:
    Copy code
    Uncaught (in promise) Error: {
      "message": "Task slick.basic.BasicBackend$DatabaseDef$$anon$2@2850f5a4 rejected from slick.util.AsyncExecutor$$anon$2$$anon$1@cfc0ea7[Running, pool size = 1, active threads = 0, queued tasks = 1000, completed tasks = 497]",
      "requestId": "us1:ck743cdcw2i8i0b90jtm8xuar"
    }
    c
    j
    +2
    • 5
    • 13
  • d

    doums

    02/27/2020, 12:47 PM
    Hi!
  • m

    Moray Macdonald

    02/27/2020, 1:35 PM
    Hi everyone! We've been using Prisma in our platform for about a year. I'm currently refactoring a lot of our data layer and to make life easier I'm trying to extend the generated TypeScript client class but I'm not having much luck due to the way the class is generated. Has anyone attempted anything like this, or do you have any suggestions on how to go about extending the generated functionality?
    l
    a
    d
    • 4
    • 9
  • d

    doums

    02/27/2020, 1:52 PM
    Hi, I have my prisma service running into a docker container. I want to handle my API (built on top of the prisma service) using a container too. So I have this Dockerfile:
    Copy code
    FROM node:latest
    
    WORKDIR /usr/src/app
    
    COPY package*.json ./
    COPY deploy/.env ./
    COPY src src/
    COPY prisma prisma/
    COPY tsconfig.json ./
    
    RUN npm i
    RUN npm i -g prisma
    RUN cd prisma && prisma deploy --env-file ../.env
    RUN npm run build
    
    EXPOSE 4001
    
    ENV NODE_ENV production
    
    CMD [ "node", "dist/index.js" ]
    and this docker-compose file:
    Copy code
    version: '3.7'
    
    services:
      api:
        container_name: api
        build:
          context: ../
          dockerfile: deploy/Dockerfile
        restart: always
        ports:
          - 4001:4001
    
    networks:
      default:
        external:
          name: prisma_pwa-network
    The prisma and the API containers are under the same network prisma_pwa-network. So the API container should be able to reach the prisma container through http://prisma_container_name:4466 The problem occurs when I run
    docker-compose up -d
    to start my API's container on the step
    prisma deploy
    Copy code
    Step 9/13 : RUN cd prisma && npx prisma deploy --env-file ../.env
     ---> Running in e29f5c5c4fc1
    npx: installed 593 in 22.789s
    
    Authenticating...
    Opening <https://app.prisma.io/cli-auth?secret=$2a$08$Rf.CuoX.mgUtFJp.5Gjr3O> in the browser
    
    Could not open the authentication link, maybe this is an environment without a browser. Please open this url in your browser to authenticate: <https://app.prisma.io/cli-auth?secret=$2a$08$Rf.CuoX.mgUtFJp.5Gjr3O>
    I fail to understand why Prisma is trying to authenticate ? Have you an idea ?
    l
    • 2
    • 11
  • m

    Moray Macdonald

    02/27/2020, 3:33 PM
    Here's a fun problem for any TypeScript gurus! https://stackoverflow.com/questions/60436587/how-can-i-extend-a-class-generated-at-runtime
  • a

    Alan

    02/27/2020, 3:40 PM
    does anyone know where I would inject the
    queueSize
    property?
  • a

    Alan

    02/27/2020, 3:40 PM
    maybe in the database configuration?
    d
    • 2
    • 8
  • k

    Kabilan

    02/27/2020, 8:11 PM
    Heya, had a question about cascading deletes. I have a Type B that has a relation to Type A. Type B is set to cascade on delete. When I individually delete with a delete by id mutation A it deletes B without any problems. However, when I delete multiple As using a deleteManyAs mutation it gives me this error.
    Copy code
    The change you are trying to make would violate the required relation '_ABRelation' between B and A",
    Is that expected behaviour? And if I wanted to do a cascading deletion while affecting many A's at a time, how would I get around this without making the relations not required.
  • s

    Smit Gandhi

    02/27/2020, 8:30 PM
    👋 I’m here! What’d I miss?
  • j

    joeyfigaro

    02/27/2020, 9:40 PM
    'Ello!
  • j

    joeyfigaro

    02/27/2020, 9:42 PM
    I'm having trouble getting started, if anyone's run into the same issue. I've updated my data model, regenerated, and redeployed — but I'm still seeing the same models available in my admin and the graphql tooling
  • j

    joeyfigaro

    02/27/2020, 9:42 PM
    the only thing available to query/mutate or check in admin is the default
    User
    a
    • 2
    • 1
  • j

    joeyfigaro

    02/27/2020, 9:42 PM
    that was created my first run
  • c

    Charles Gaudreau Jackson

    02/28/2020, 12:08 AM
    Is someone familiar with this error? Thank you!
  • c

    cfree

    02/28/2020, 2:16 AM
    @charles A couple of us are seeing the same issue, discussing in this thread: https://prisma.slack.com/archives/CA491RJH0/p1582769345086100
    😭 2
    👍 3
    c
    • 2
    • 4
  • a

    adrianmg

    02/28/2020, 5:39 AM
    👋
    🙌 1
  • m

    MGH Developpers

    02/28/2020, 8:02 AM
    👋 I’m here! What’d I miss?
  • d

    doums

    02/28/2020, 10:42 AM
    Hi guys, I still need help on this issue -> https://github.com/prisma/prisma/issues/5025 I don't understand why Prisma needs to authenticate when running
    prisma deploy
    on a container build phase ? Has Anyone else had experienced this kind of problem before ?
  • a

    Asjas

    02/28/2020, 12:35 PM
    Has anyone else been experiencing these errors when using the Prisma Admin Dashboard on app.prisma.io? A few people have reported in another slack that when they create a hosted database and they open Prisma Admin it just keeps loading and it shows errors in the browser console. This is on a
    demo prisma
    server in the EU region.
    👍 2
    😭 2
  • j

    johhansantana

    02/28/2020, 6:52 PM
    does anyone know how to deploy prisma client anywhere?
    c
    • 2
    • 3
  • b

    Bram

    02/28/2020, 10:28 PM
    Trying to expose two versions of a type in Prisma2. I wan't authenticated users to access 5/5 fiels and unauthenticated 3/5 fields. Anyone know how to?
  • l

    Lars Ivar Igesund

    02/29/2020, 8:40 AM
    Do anyone know how Prisma can be built with newer (Java) mongodb drivers?
    • 1
    • 1
  • e

    emad darabeh

    02/29/2020, 10:10 AM
    which database (PostgreSQL or MongoDB) is better for storing restaurants with their locations, and getting the nearby restaurants?
  • l

    Lars Ivar Igesund

    02/29/2020, 10:28 AM
    Ok, so next building question - how can I build new docker images (like the official ones) for prisma 1? I believe I have built the source going into it using sbt, but getting from there to understanding how the docker images are composed is currently eluding me...
    • 1
    • 4
  • y

    YAROSLAV ZAIKA

    02/29/2020, 12:29 PM
    Hi. I think, I correctly understand that I can ask a question about my problem with prisma here. I use prisma 1.34. For me, not working. It's prisma.io/docs/prisma-client/features/realtime-JAVASCRIPT-rsc8/ When I try to do
    Copy code
    console.log(db.$subscribe)
    I get "undefined" I don't understand. It's problem my project or it's global problem. I am looking for a solution to this problem for 2 days.
  • b

    Brian Hopkins

    02/29/2020, 2:38 PM
    so I have a issue I can't seem to figure out. I thought my resolvers were setup right in graphql-yoga for the prisma setup but anytime I try to get my
    shed
    records that are a relation to the
    snake
    record via graphql-yoga the records are null but from the prisma playground they are there correctly so that tells me I don't have something right in my resolver but not sure what I have wrong: Broken response:
    Copy code
    {
      "data": {
        "snakes": [
          {
            "id": "ck765gln5000n0859cig4sydm",
            "name": "nacho",
            "description": "Description of nacho ball python",
            "createdAt": "2020-02-28T12:25:27.942Z",
            "sheds": null,
            "owner": {
              "id": "ck765g9qg000h08594d0k419n",
              "username": "test",
              "firstName": "test",
              "lastName": "user",
              "email": "<mailto:test@test.com|test@test.com>"
            }
          }
        ]
      }
    }
    Good Response From Prisma:
    Copy code
    {
      "data": {
        "users": [
          {
            "id": "ck765g9qg000h08594d0k419n",
            "username": "test",
            "snakes": [
              {
                "id": "ck765gln5000n0859cig4sydm",
                "name": "nacho",
                "sheds": [
                  {
                    "shedDate": "2020-02-28T11:33:50.113Z",
                    "id": "ck765gvsd000v0859bq6nomca",
                    "complete": true
                  }
                ]
              }
            ]
          }
        ]
      }
    }
    My resolver code for this branch is at https://github.com/serpent-tracker/api/blob/add_sheds/src/resolvers/Shed.js if anyone can tell me what I'm missing I thought this should work, it worked fine for my User relation to the snakes they owned
    • 1
    • 1
  • a

    Aakash Khatkar

    03/01/2020, 8:44 AM
    Hi all , I'm going to discuss the stack we are going to use for our next project with my team this evening. I just want to know how easy it is to change database model or schemas in future if our app needs to introduce new features.
  • t

    Tomislav Stampfel

    03/01/2020, 9:06 AM
    Hi everybody. I am new to Prisma and just wanted to ask a question to some senior and more knowledgeable members. How do you scale subscriptions in Prisma Framework? As I understand there are currently some limitations in place.
1...349350351...637Latest