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

    Julius Dockwarder

    01/18/2020, 5:56 PM
    I have a question: From apollo-server I can import UserInputError objects for example. Can I import error objects from
    graphql-yoga
    to handle errors within my API?
  • e

    Eric

    01/19/2020, 9:19 PM
    Hey, I have a question regarding the
    info
    parameter that the prisma client accepts and graphql yoga supplies. I'm using prisma 1.34 and I'm finding that the
    info
    argument isn't really useful. Can someone explain if this is generally safe to not include the info argument and where it might be necessary to provide it? As a last question, is the
    info
    parameter going to be necessary for Prisma Foundation's
    Photon
    when using with graphql-yoga?
  • j

    Julien C.

    01/20/2020, 10:34 AM
    Hello, could anyone give me a hint on the sbt command to use to build prisma-server docker image locally ? Thanks
    d
    • 2
    • 1
  • t

    Tallan Groberg

    01/20/2020, 9:22 PM
    What’s up everyone! If anyone is interested in learning how to do nested routes in react this is my tutorial on it https://dev.to/tallangroberg/react-router-dom-nested-routes-4ank
  • r

    Ruhan Khandakar

    01/21/2020, 6:31 AM
    how to use VARCHAR(255) in prisma model ?
  • c

    cmpmohan

    01/21/2020, 6:53 AM
    Prisma is not connecting to external postgresql database. its saying below error. i can login same database in locally. can some one help us to fix issue.? rg.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host user , database "postgres", SSL on
    m
    • 2
    • 2
  • t

    tomhut

    01/21/2020, 4:13 PM
    https://github.com/prisma/prisma2/releases/tag/2.0.0-preview020 đŸ‘€đŸ‘€đŸ‘€
    đŸ‘€ 1
    prisma rainbow 1
  • p

    Praveen

    01/21/2020, 4:37 PM
    Hi I tried specifying ID as
    id:Int! @id(strategy: SEQUENCE) @sequence(name: "DESK_SEQUENCE", initialValue: 1, allocationSize: 1)
    but faced this issue https://github.com/prisma/prisma/issues/4555. I have reverted my changes to
    id: ID! @id
    and did prisma deploy and prisma generate. But still Im getting the error
    "exception":"java.sql.SQLException: (conn=4) Incorrect integer value: 'ck5o3fh1i002c0704sq1jtqsw' for column 'id' at row 1"
    Am I missing any step here?
  • a

    Arsalan.dev

    01/21/2020, 5:01 PM
    hi this is arsalan, recently i started freelancing on upwork and fiverr and i want to share with you all to support me. Also teach or help with your expert advice what is wrong on my profile please guide on it and share it with your traffic. thank you đŸ˜€ Fiverr https://www.fiverr.com/arsalansdarshad Upwork https://www.upwork.com/o/profiles/users/_~016f6b130756ef1f1d/
  • m

    Mohammad Javad Ebrahimzadeh

    01/23/2020, 12:09 PM
    Hello there i want to start a project with Prisma and i want to use my existing local mongodb database which is started on localhost:27017 but i dont know how to find the string for starting a new project with prisma. someone plz help me tnx
  • h

    horia.ancas

    01/23/2020, 12:56 PM
    hello, how hard do you think it would be to migrate from Prisma 1 to Prisma 2?
    n
    • 2
    • 5
  • a

    André

    01/23/2020, 6:44 PM
    Hello everyone. I'm working on a small prototype of a graphql + prisma api and, although I understand what is wrong, I don't know what's the best approach to it. I've a login mutations that returns both the jwt token and the user.
  • a

    André

    01/23/2020, 6:44 PM
    Copy code
    async login (parent, { data }, { prisma }, info) {
        const user = await prisma.query.user({
          where: {
            email: data.email
          }
        })
    
        if (!user) throw new Error('User does not exist')
    
        const passwordMatches = await bcrypt.compare(data.password, user.password)
    
        if (!passwordMatches) throw new Error('Invalid credentials')
    
        return { user, token: generateToken(user.id) }
      }
  • a

    André

    01/23/2020, 6:46 PM
    The thing is, since I'm not passing info to the prisma query, it isn't returning the lists that are part of relational data but, at the same time, my User always has to return a non nullable list so it throws me
    Cannot return null for non-nullable field User.restaurants.
  • a

    André

    01/23/2020, 6:48 PM
    I could pass info to it but then it doesn't query correctly as the info contains not only the user resolver but also the token. What is the best approach towards this situation? Should I somehow extract the selection set for the User resolver or something else?
  • h

    halborg

    01/24/2020, 8:48 AM
    Just looked into my
    npm audit
    output, and it seems all of my
    high
    or
    critical
    vulnerabilities comes from Prisma-related packages:
    d
    r
    • 3
    • 9
  • m

    Mohammad Javad Ebrahimzadeh

    01/24/2020, 11:09 AM
    hi how can i solve this problem?
    prisma deploy
    ERROR: No cluster could be found for workspace '*' and cluster 'default'
    {
    "data": {
    "generateClusterToken": null
    },
    "errors": [
    {
    "message": "No cluster could be found for workspace '*' and cluster 'default'",
    "locations": [
    {
    "line": 3,
    "column": 9
    }
    ],
    "path": [
    "generateClusterToken"
    ],
    "code": 222
    }
    ],
    "status": 200
    }
    Get in touch if you need help: <https://slack.prisma.io>
    To get more detailed output, run $ export DEBUG="*"
    (node:15304) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
    d
    l
    • 3
    • 15
  • b

    Brad Slattman

    01/24/2020, 3:37 PM
    @Nick svelte and sapper are nice
  • b

    Brad Slattman

    01/24/2020, 3:39 PM
    "migrate": "npx prisma2@2.0.0-preview019 lift save && npx prisma2@2.0.0-preview019 lift up"
  • m

    Max

    01/27/2020, 1:31 AM
    Hey , I have a possibly very stupid question. If I have a type like Type Bar{ ... voucher : Voucher! } Type Voucher { ... Bar: Bar! @relation(link:inline) } Is it even possible to create a bar entry in the database? Since a bar needs a voucher and a voucher needs a bar. How can I solve this? In my case every bar needs to have vouchers and every voucher absolutely relates to a bar so I made both non-null but now it's giving me headaches... Is there any solution except removing ! From one of those?
  • e

    Elias GM

    01/27/2020, 5:30 AM
    Anyone knows how to defer graphql results with Prisma? ie loading only important ui data then patching later
  • r

    Ruhan Khandakar

    01/28/2020, 5:49 AM
    Need urgent help , how to pass datetime from prisma playground ? [Solved]
  • p

    Pratik Jaiswal

    01/28/2020, 1:56 PM
    I have this client and projects model. I want to Query Clients and get their respective projects. Need help on how to resolve projects when querying client.
    {
    "id": 1,
    "name": "Client1",
    "projects": [
    {
    "id": 1,
    "name": "Project 1"
    }
    ]
    }
  • m

    Mike MacCana

    01/29/2020, 1:55 PM
    Hello all. I am making a schema using Prisma 2. I have
    Event
    s. Each
    event
    has an
    owner
    which is a
    Person
    . Some events also have a
    recipient
    , which is also a
    Person
    . However I'm not totally sure of the syntax, despite reading the docs. Here's my `schema.prisma`:
    n
    • 2
    • 2
  • m

    Mike MacCana

    01/29/2020, 1:55 PM
    (moved to #prisma2-preview channel)
  • m

    Mike MacCana

    01/29/2020, 4:24 PM
    I like the pluralisation. I have a
    Person
    model - so there's a single identity for website visitor, lead, and customer - and seeing
    prisma.people
    is cool.
    đŸ™Œ 2
    g
    • 2
    • 1
  • d

    Darko Lacen

    01/30/2020, 9:48 AM
    Hi, is there any way to access multiple database schemas with prisma client?
    z
    j
    • 3
    • 3
  • r

    RMCS

    01/31/2020, 7:23 AM
    Hi, i'm trying to set up a project with react, typescript and graphql-yoga. Is there any way to get the types for the middleware?
    const isLoggedIn = async (resolve: any, parent: any, args: any, ctx: any, info: any)
    I would like to specify the types..
    t
    • 2
    • 2
  • p

    Phil R

    01/31/2020, 4:18 PM
    Hello! I ran into an issue with prisma migrate. Error message tells me to post error in your slack, so here I am đŸ˜‰ Error: https://gist.github.com/phil-r/18cc2e2c3e0c5c3da9fcc8ce3787d286
  • p

    Phil R

    01/31/2020, 4:19 PM
    This error only occurs on a server in a Docker container, same migration runs fine locally(although my test database is much smaller)
1...343344345...637Latest