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

    Robin Métral

    02/06/2020, 11:58 AM
    Hey! Did I notice correctly that MongoDB support is not in the roadmap to Prisma 2? Are you planning on continuing support or will Prisma 2 only support MySQL, Postgres and SQLite?
    l
    n
    • 3
    • 4
  • g

    gaudi

    02/06/2020, 7:19 PM
    hello! i've been using this to bootstrap a project https://github.com/graphql-boilerplates/react-fullstack-graphql I changed everything schema related but when i `prisma seed`it gives me an error saying my createEntity mutation doesn't exist and didn't I mean createPost? A far as I can see, there is no longer any reference to createPost!! Any ideas? Thanks!
    • 1
    • 6
  • t

    Tyler Bainbridge

    02/06/2020, 11:46 PM
    lol- dumb question, but does anyone know what color theme is used in the docs?
    k
    • 2
    • 5
  • l

    lucid_frog

    02/07/2020, 2:35 AM
    whats up guys, any idea as to why this could be failing when running
    prisma deploy
    ?
    Copy code
    type User {
      id: ID! @id
      name: String!
      email: String!
      package: ListingPackage!
    }
    
    enum ListingPackage {
      2_WEEKS
      4_WEEKS
      6_WEEKS
      6_MONTHS
      UNLIMITED
    }
    can't find why! 😞
    s
    n
    • 3
    • 5
  • y

    Yann Suissa

    02/07/2020, 3:01 PM
    Hi there, I've upgraded to the preview 21, I was using "npx prisma2 dev" for auto migration, is there an equivalent now? or we have to "prisma2 migrate save --experimental" manually each time, thanks
    j
    • 2
    • 4
  • l

    Lars-Jørgen Kristiansen

    02/07/2020, 5:05 PM
    Is there some way to get inline ids of relationships without causing another query? strugling with alot of N+1 problems 😞
  • d

    Dillon Thompson

    02/08/2020, 4:25 AM
    hey everyone, I’m new here and I’m currently trying to put out a fire that I didn’t start so I’m kind of shooting in the dark here. but the issue I’m having is that I’m trying to deploy my prisma service via
    prisma deploy
    but it’s returning this error:
    Error: Authentication token is invalid: Token can't be decoded: Invalid signature for this token or wrong algorithm
  • d

    Dillon Thompson

    02/08/2020, 4:26 AM
    again, I didn’t start this fire so I’m almost completely blind here
  • d

    Dillon Thompson

    02/08/2020, 4:26 AM
    any help will be greatly appreaciated
  • l

    lucid_frog

    02/08/2020, 12:26 PM
    is there a tool to make a graph of our prisma generated database, kinda like a certain gem for ruby on rails ?
  • l

    lucid_frog

    02/08/2020, 1:51 PM
    Pagination tutorial If any of you were wondering how to add pagination to your website, here's how you can do it. Posting this because the documentation on pagination is missing a few details. Look for your
    <ModelName>Connection
    inside your generated docs (
    <http://localhost:4466/>
    ) Pagination done on a
    Listing
    model The key thing here is that we get the information needed (
    hasNextPage, hasPreviousPage
    ) to create an effective pagination system.
    Copy code
    {
      listingsConnection(
        first:1
        skip:0
      ){
        edges{
          node{
            id
            title
          }
          cursor
        }
        pageInfo{
          hasNextPage
          startCursor
          hasPreviousPage
          endCursor
        }
        aggregate{
          count
        }
      }
    }
    result:
    Copy code
    {
      "data": {
        "listingsConnection": {
          "edges": [
            {
              "node": {
                "id": "ck6dlze2500lg08478nmyysx3",
                "title": "Senior Javascript developer",
                "createdAt": "2020-02-08T13:02:39.333Z",
                "owner": {
                  "id": "ck6dk6jdl009w08476yk3ogyf",
                  "name": "Alex",
                  "email": "<mailto:a@a.com|a@a.com>"
                }
              },
              "cursor": "ck6dlze2500lg08478nmyysx3"
            }
          ],
          "pageInfo": {
            "hasNextPage": false,
            "startCursor": "ck6dlze2500lg08478nmyysx3",
            "hasPreviousPage": false,
            "endCursor": "ck6dlze2500lg08478nmyysx3"
          },
          "aggregate": {
            "count": 1
          }
        }
      }
    }
  • l

    lucid_frog

    02/08/2020, 11:04 PM
    Since I've added the
    secret
    property inside the
    prisma.yml
    file, my
    prisma client
    doesn't seem to be working anymore. When I remove it from the
    prisma.yml
    file everything works as expected. Any idea? I thought the prisma client being generated from the prisma.yml file would pass the JWT bearer token by itself? edit: when I do have the
    secret
    property in place, the client just loads indefinitely, there are no "expired token" errors 🤔 Here's what's in my
    index.ts
    file (generated from
    prisma deploy
    Copy code
    export const Prisma = makePrismaClientClass<ClientConstructor<Prisma>>({
      typeDefs,
      models,
      endpoint: `<http://localhost:4466>`,
      secret: `7612368172shdbahjsbdkjIOUHAUID+_+A001S110D001110UY*&^%&TBGANSUDHASKJD001`
    });
    export const prisma = new Prisma();
    j
    • 2
    • 1
  • k

    knowbody

    02/09/2020, 8:22 PM
    Where can I find an up to date guide on using prisma2 graphql-yoga docker postgres?
    l
    • 2
    • 4
  • c

    Carlos Valdez

    02/09/2020, 10:41 PM
    Hi, I'm new using Prisma. Is there any way to disable the Prisma playground?. I’m using a Docker container.
    g
    • 2
    • 4
  • m

    Marcel

    02/10/2020, 10:25 AM
    Hello! I have just discovered prisma yesterday. I plan to rebuild my api with it when v2 gets released, in Go. The only thing I don't like or don't get is the need of another server instance ("Prisma Server"). Is this still a need in v2? If no, why was it in v1? Why isn't it just a library/ a framework you use to code your backend? Thank you 🙂
    j
    • 2
    • 6
  • j

    Jonathan

    02/11/2020, 7:00 AM
    Anybody had luck mounting prisma on Google Cloud Run and Cloud SQL?
    g
    m
    • 3
    • 18
  • a

    Aske

    02/11/2020, 10:01 AM
    Hey anyone know any workarounds for the missing OR and NOT query support in Prisma 1 for MongoDB? Only found using an older version (1.24) and client side filtering (not viable due to data exposure) as possible solutions. Thanks! 🙂
  • p

    Pratik

    02/11/2020, 10:07 AM
    I am using Prisma + MySQL in Production. Works great! There's a need in near future where we need to use neo4j alongside/completely. Any suggestions on can we achieve this with the existing artifacts, as apparently Prisma doesn't support neo4j. So if we can continue using Prisma or we stop using it and start using neo4j orm.
  • n

    Naor W

    02/11/2020, 3:35 PM
    Hi guys, im testing prisma with mongo and it looks great. however im a bit concerned about deploying it in prod because it connects to /admin db. i have multiple dbs for different projects and im not sure how it will workout. is there any way to limit prisma during the deploy phase that im missing? thank you in advance.
  • j

    Jon

    02/11/2020, 4:12 PM
    Hi, I'm looking to connect to websocket api is there any best practices to do so?
  • a

    Amaan Sayed

    02/11/2020, 6:31 PM
    Hey everyone! I’m still new to Prisma and I’m learning authentication for the first time for building my app. Does anyone know what the best practices are for logging in a user and persisting their data? Would JWT work well in this regard or should I use sessions? I know it’s based on opinions but I just need something fast right now. I saw a tutorial using an older version of Prisma that set up the JWT automatically. Would I have to set it up myself? I’d appreciate any input, thanks!
  • s

    Suniron

    02/11/2020, 7:21 PM
    Hi all !
  • n

    Nelson Pecora

    02/12/2020, 8:39 PM
    Hi all, I’m getting some weird error messages from prisma when running fairly mundane queries:
    Copy code
    Task slick.basic.BasicBackend$DatabaseDef$$anon$2@244b3539 rejected from slick.util.AsyncExecutor$$anon$2$$anon$1@684d63fb[Running, pool size = 9, active threads = 9, queued tasks = 1000, completed tasks = 71289]
    
    java.util.concurrent.RejectedExecutionException: Task slick.basic.BasicBackend$DatabaseDef$$anon$2@244b3539 rejected from slick.util.AsyncExecutor$$anon$2$$anon$1@684d63fb
    
    {
      "query": "query ($where: ContentWhereUniqueInput!) {\n  content(where: $where) {\n    legacyArticle {\n      id\n    }\n  }\n}\n",
      "variables": "{\"where\":{\"id\":\"ck5zd4yko000e3h5mlpov0qfq\"}}",
      "code": "0",
      ...
    }
    l
    • 2
    • 2
  • c

    Chad

    02/13/2020, 4:54 AM
    Does anyone know of a way to dynamically change the prisma end point? I have a client which wants to use separate databases for each customer, so I'd need a way to switch between them on login. any ideas?
    l
    e
    • 3
    • 3
  • n

    Nabeel

    02/13/2020, 5:53 PM
    Hey! Anyone know of a tool to generate a Prisma schema from a JSON schema?
    j
    • 2
    • 6
  • n

    Nabeel

    02/13/2020, 5:54 PM
    Specifically trying to generate for use with prisma2 and lift
  • j

    Jonathan

    02/13/2020, 8:42 PM
    Anyone knows how much ram does prisma server needs?, what are all the requirements for the server to run smoothly?
    👍 1
    g
    • 2
    • 1
  • d

    Dexter Marks-Barber

    02/14/2020, 1:16 AM
    Hey! I'm trying to read up on selecting fields. The documentation show defining every field excluding the fields that you don't want to select. Is there a flip to this? Where you only need to define the fields that you don't want to select?
  • a

    Amaan Sayed

    02/14/2020, 2:14 AM
    Hey everyone! So Prisma out of the box comes with a premade schema and resolvers based on the datamodel.prisma file. Is there any way I can generate all of those same resolvers to my own file, so that I keep the same functionality but move away from the Prisma server? I think I read that I shouldn’t keep that link after production because of security risks correct?
  • r

    Ruhan Khandakar

    02/14/2020, 7:54 AM
    @schickling @nikolasburk how to connect ec2 postgres database with prisma cloud ?
1...345346347...637Latest