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

    Chung Tran

    04/12/2020, 9:08 AM
    Hello, I need help, Can I write question here?
  • t

    Taylor

    04/12/2020, 1:14 PM
    Your token is invalid. It might have expired or you might be using a token from a different project.", "code": 3015
  • t

    Taylor

    04/12/2020, 1:15 PM
    Any ideas why I'm getting this?
  • t

    Taylor

    04/12/2020, 1:15 PM
    Prisma server is in production
  • t

    Taylor

    04/12/2020, 1:20 PM
    Nevermind, I think it's https://
  • t

    Taylor

    04/12/2020, 5:34 PM
    Why is it so challenging to get a production server with Prisma/GraphQL yoga running
  • a

    Adriano Resende

    04/13/2020, 5:08 AM
    Hello, I’m new to Prisma, I’m building a project with a new version beta 2 but I’m having difficulty without being able to check all queries paths as GraphQl Playground shows in the Docs tab. Someone can help me about query relation?
    s
    • 2
    • 4
  • r

    Rain

    04/13/2020, 8:06 AM
    I am setting up docker to run my code, my Prisma works fine in my local machine, but when I tried to use docker I received the following error
    Copy code
    "message": "\nInvalid `prisma.user.findOne()` invocation in\n/app/dist/src/user/user.service.js:31:40\n\nspawn /app/node_modules/@prisma/client/runtime/query-engine-debian-openssl-1.1.x ENOENT"
    I added
    debian-openssl-1.1.x
    to my
    binaryTargets
    and already ran
    npx prisma generate
    r
    r
    • 3
    • 5
  • t

    terion

    04/13/2020, 2:04 PM
    Hi everyone. I'm getting strange error on 1.34:
    Invalid input "on Query\n}", expected FragmentName, TypeCondition or Directives
    on simple unique query, like this
    Copy code
    await ctx.prisma.query.survey({where: {id: id}})
    Logs here: https://github.com/prisma/prisma/issues/2174 Has anyone see smth like this before? Any ideas?
    r
    • 2
    • 3
  • h

    hanwool

    04/13/2020, 2:27 PM
    Hi is there good pagenation example with prisma to defeat N+1 problem?
  • n

    Nicola Nardella

    04/13/2020, 2:34 PM
    Hello, someone is trying to use
    graphql-nextjs
    example?
    a
    • 2
    • 2
  • m

    Mario Jimenez

    04/13/2020, 2:34 PM
    Hello!, probably this is something someone asked before but how can I use
    prisma
    with the
    .env
    file that my project is using instead of the
    .env
    that lives in the
    prisma
    dir?
    a
    r
    • 3
    • 4
  • r

    Raluca Fleseriu

    04/13/2020, 4:19 PM
    Hello, I have this model on Prisma 1, many-to-many relashionship between User and WindTurbine, And I keep getting the error bellow (at the end of the message ERROR: relation \"default$default._WindTurbinesUsers\" does not exist\n P): It seems the user property in WindTurbine is null, and the table/or relationship is not created in DB Any idea how to fix and get a proper query/mutation wthout throwing errors? __ type User { id: ID! @id windTurbines: [WindTurbine] } type WindTurbine { id: ID! @id users: [User] } __
    Copy code
    {
        windTurbines( 
          where: { id: "ck6kkbz5r00ms0804tc1oz05f"}
        )
    	{
        id
        users {name}
      }
    }
    Copy code
    {
      "data": {
        "windTurbines": [
          {
            "id": "ck6kkbz5r00ms0804tc1oz05f",
            "users": null
          }
        ]
      },
      "errors": [
        {
          "message": "Whoops. Looks like an internal server error. Search your server logs for request ID: local:ck8yokfr43lg90738p9zxaviv",
          "path": [
            "windTurbines",
            0,
            "users"
          ],
          "locations": [
            {
              "line": 4,
              "column": 5
            }
          ],
          "requestId": "local:ck8yokfr43lg90738p9zxaviv"
        }
      ]
    }
    How can I fix this? Notes: • No realtion table is created in postgres db • Tried also adding l windTurbines: WindTurbine! @relation(link:TABLE, name: "UsersWindTurbines") type UsersWindTurbines @relationTable { user: User! windTurbine: WindTurbine! }
    s
    r
    • 3
    • 4
  • e

    Ervin

    04/13/2020, 4:48 PM
    I'm hoping someone can point me in the right direction for an issue I'm seeing. We are running into an issue where we are getting connection refused in response to http requests to the service. I've been looking for metrics to see what the incoming connection limit is (and ideally capture/graph it so we can see if it is being hit), but haven't found a good way to expose that type of information from the docker image. It looks like there is some code for micrometer and prometheus but I haven't found a way to actually scrape it or really interact with it.
    r
    • 2
    • 1
  • r

    Rashmi Bidanta

    04/13/2020, 9:50 PM
    Is there a channel that still does discussion on issues specifically productions issues related to scalability and stuff with regards to Prisma1
    r
    e
    h
    • 4
    • 40
  • r

    rein

    04/14/2020, 9:08 AM
    Is there any way to use the generated prisma types (housed under
    @prisma/client
    ) as rootTypings for nexus@next? Right now, Nexus doesn't handle interfaces and subtypes without having an explicit rootType present.
    n
    w
    j
    • 4
    • 21
  • d

    Dimitri Ivashchuk

    04/14/2020, 10:04 AM
    https://egghead.io/playlists/get-started-with-prisma-v2-prisma-client-8bae?af=iir7r I’ve recorded some small introduction to prisma 2 namely prisma client and would be glad if you learn something new from it and provide feedback in any form😀
    💚 1
    fast parrot 7
    prisma rainbow 4
  • s

    sash

    04/14/2020, 11:31 AM
    is there an equivalent to
    prisma reset
    in prisma2?
    r
    a
    • 3
    • 5
  • s

    Sijad

    04/14/2020, 4:46 PM
    hi, how can I include relation
    count
    using prisma2?
  • s

    Sijad

    04/14/2020, 4:49 PM
    I need to include
    count
    of the realtion using
    findMany
    r
    • 2
    • 7
  • m

    martin

    04/14/2020, 5:52 PM
    Reposting here as well (posted this morning in #prisma2-beta channel). Created a GraphQL server using Prisma and PostgreSQL on Zeit’s serverless platform and wrote up a “how-to” (complete with demo and repo). https://medium.com/ecstatic-engineering/how-to-deploy-a-graphql-server-with-prisma-to-a-serverless-platform-49c573e9b26e
    prisma green 2
    🚀 2
  • v

    Vince Biro

    04/15/2020, 12:00 PM
    Hi guys, Has a solution already been made for case insensitive findMany querying? For example, here I would like to search in the title field, but contains is case sensitive. I am looking for an option in the API, or something like "containsInsensitive:searchString"
    Copy code
    return ctx.prisma.post.findMany({
          where: {
            OR: [
              {
                title: {
                  contains: searchString,
                },
              },
              {
                content: {
                  contains: searchString,
                },
              },
            ],
          },
        })
    👍 1
    r
    j
    +2
    • 5
    • 5
  • u

    Umar Ali Khan

    04/15/2020, 1:07 PM
    Hello! I am Umar from Rawalpindi, Pakistan
    🙌 1
    👋 7
  • w

    windkomo

    04/15/2020, 2:18 PM
    planning to migrate from mysql to postgresql (amazon rds) to get native scalarlist support… anyone here done that?
  • j

    James Homer

    04/15/2020, 5:12 PM
    I’m just upgrading from nexus@0.3.x, am I correct that I now need to create all the types and input types manually?
    d
    • 2
    • 5
  • j

    James Homer

    04/15/2020, 5:12 PM
    Missing type WorkspaceUser, did you forget to import a type to the root query or mean Workspace?
  • j

    James Homer

    04/15/2020, 5:12 PM
    Missing type UserWhereInput, did you forget to import a type to the root query?
  • a

    Alosies

    04/15/2020, 5:15 PM
    Hello. I'm trying to set up a subscription, but I only get the scalar fields and not the nested fields. I'm using prisma-client. My resolver
    Copy code
    import { prisma } from '../../../../prisma-client'
    
    realTimeQuizInstance: {
        subscribe: async (parent, args, ctx, info) => {
          return prisma.$subscribe.realTimeQuizInstance({}, info)
        },
        resolve (payload, args, ctx, info) {
          return payload;
        }
      }
    My subscription
    Copy code
    subscription RTQInstanceSubscription($where: RealTimeQuizInstanceSubscriptionWhereInput) {
      realTimeQuizInstance(where: $where) {
        mutation
        node {
          id
          currentQuestionIndex
          quizAttempts(orderBy: score_DESC, first: 10){
            score
            user{
              fullName
              picture_large
              customPictureUrl
            }
          }
        }
      }
    }
    The result
    Copy code
    {
      "data": {
        "realTimeQuizInstance": {
          "mutation": "UPDATED",
          "node": {
            "id": "xxxxxxx",
            "currentQuestionIndex": 4,
            "quizAttempts": null
          }
        }
      }
    }
    I'm getting
    null
    for
    quizAttempts
    . How do I get the nested fields? I have been searching and trying to resolve this for more than a day now. Any help is highly appreciated.
  • j

    James Homer

    04/15/2020, 5:53 PM
    Can anyone point me in the direction of the replacement for the `$fragment`api in prisma2?
  • j

    James Homer

    04/15/2020, 5:56 PM
    Ah nvm looks like https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/field-selection#include
    👍 1
1...363364365...637Latest