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

    Lars Ivar Igesund

    09/13/2020, 1:48 PM
    ccccccickcjbijdjtirncdidihrigchklvnchlcrrckv
    🦜 2
    n
    • 2
    • 2
  • a

    Aadarsha

    09/13/2020, 8:19 PM
    I was following the tutorial from this docs ForeignKeyDemo but when i run
    Copy code
    npx prisma introspect
    i get extra file with sth like this ..
    r
    • 2
    • 1
  • a

    Aadarsha

    09/13/2020, 8:21 PM
    also i was asked these questions when i run that command.
  • g

    Gabriel Oliveira

    09/14/2020, 1:08 AM
    Hi all, I'm having several errors on docker logs after running prisma(1.34 image) I have copied it all into this pastebin: https://pastebin.com/y0e7CbpL I'm having the impression it's something related to java 1.8 sdk on my machine (there is a print of my java info on this pastebin just before the docker logs) I have recently upgraded my pc to install ubuntu 20.04 and this started happening, so I guess I messed up my java install but cannot find where since other things work ok on java here but at the same time, I had no such problems in my previous PC running the exact same project but on ubuntu 18.04 I believe this problem could be something very basic on the java setup but I really cannot figure out, it's probably right there on the logs but I cannot see it If someone could give me some tips on how to start looking for this problem on the right track I'd really appreciate. Thanks!
  • k

    Kohki Shiga

    09/14/2020, 1:49 AM
    Hi. Seems like this channel is the most active. I have a question regarding graphql nexus and prisma. I'm thinking of using graphql nexus for my personal project. I am stuck with this error for quite a while and I would appreciate if anyone has any idea.
    Copy code
    The change you are trying to make would violate the required relation 'DrinkingLocationsToUser' between the `DrinkingLocations` and `User` models.
    The entities are as follows:
    Copy code
    model User {
      id               String            @default(cuid()) @id
      username         String
      password         String
      drinkingLocation DrinkingLocations
      profile          Profile
    }
    
    model DrinkingLocations {
      id           String   @default(cuid()) @id
      locationName String
      longtitude   Float
      latitude     Float
      createdAt    DateTime @default(now())
      user         User     @relation(fields: [userId], references: [id])
      userId       String
    }
    For the nexus code I wrote this
    Copy code
    schema.objectType({
      name: 'User',
      definition(t) {
        t.string('id', { description: 'Id of the user' });
        t.string('username', { description: 'Name of the user' });
        t.string('password', { description: 'Encrypted password' });
        t.field('DrinkingLocations', {
          type: 'DrinkingLocations',
        });
        t.field('Profile', {
          type: 'Profile',
        });
      },
    });
    
    schema.objectType({
      name: 'DrinkingLocations',
      definition(t) {
        t.string('id', { description: 'Id of the Drinking location' });
        t.string('locationName', { description: 'Name of the Drinking Location' });
        t.float('longtitude', { description: 'Longtitude of the Drinking ' });
        t.float('latitude', { description: 'Latitude of the Drinking Location' });
        t.date('createdAt', { description: 'Time when the user started drinking' });
        t.string('userId', { description: 'Foreign key to User' });
        t.field('user', {
          type: 'User',
        });
      },
    });
    
    schema.mutationType({
      definition(t) {
        t.crud.createOneUser();
        t.crud.createOneDrinkingLocations();
        t.crud.createOneProfile();
      },
    });
    But when I try to test it out on Graphql Playground I get that error when executing the mutation query:
    Copy code
    mutation {
      createOneDrinkingLocations(
        data: {
          locationName: "ORCHARD GINZA"
          latitude : 35.672422
          longtitude: 139.763155
          user: {
            connect: {
              id: "ckf0gb3wb0000gfzyoen9psbr"
            }
          }
        }
      ){
        id
        locationName
        latitude
        longtitude
        createdAt
      }
    }
    I'd really appreciate if someone has any clue about this
    r
    • 2
    • 2
  • m

    Manthan Mallikarjun

    09/14/2020, 2:20 AM
    What are the upcoming features for the next release of prisma?
    r
    • 2
    • 1
  • m

    Manthan Mallikarjun

    09/14/2020, 2:35 AM
    Also is prisma considering supporting custom migrations? For example if I want to run some sql to change all emails in the db to lowercase?
    r
    • 2
    • 1
  • j

    Justin Ellingwood

    09/14/2020, 5:21 PM
    We just pushed a new article to Prisma's Data Guide on filtering data in PostgreSQL And to tie it all back together, here's how Prisma client handles some of the topics discussed within: • Filtering • Aggregations • Pagination
    prisma rainbow 5
    💯 3
  • n

    Natalia

    09/15/2020, 10:56 AM
    👋 Join us at week’s events that are featuring or organised by Prisma: • September 15, 3:40PM CEST - Tightening the Full-Stack Development Loop with Nexus and Prisma - A talk by Ryan Chenkie at Geekle React Summit; • September 16, 6PM CEST - Modern backend with TypeScript, PostgreSQL and Prisma - Part 4: Deployment - 

    A livestream by Daniel Norman▾

    • September 17, 5PM CEST - What’s new in Prisma (v2.7.0) - 

    A livestream by Ryan Chenkie and Nikolas Burk▾

    Looking forward to having you there! 🤗
    prisma green 6
    💯 6
  • t

    Ton Nguyen

    09/15/2020, 10:58 AM
    hey guys, I have a developer complaining about prisma and I'm not sure if he's making any sense
    r
    e
    • 3
    • 9
  • k

    KJReactor

    09/15/2020, 6:11 PM
    The
    prisma migrate save --experimental
    command stopped working. I am running v2.6
    ⁉️ 2
    j
    a
    • 3
    • 11
  • p

    Philipp Rajah Moura Srivastava

    09/15/2020, 11:16 PM
    Hi everyone, so I’m attempting to query a type and I want all instances where a field of that type is null. Is there a proper way to do this? I can think of a solution, however I suspect that solution might create problems elsewhere.
    r
    • 2
    • 19
  • m

    Martïn

    09/16/2020, 11:15 AM
    Prisma engine for windows won't go past 75% downloading... while upgrading to 2.7.0 on Windows 10. Version: eaade828a21d8ee3f4940f0af7da3ae0922db4df> Downloading Prisma engines for windows [=============== ] 75%
    j
    • 2
    • 11
  • a

    Aadarsha

    09/16/2020, 1:32 PM
    guys are there any tutorials regarding Prisma2 with POstgresql & Nodejs, express I've looked at docs and grasp basic concept regarding prisma but can't start the project basically I used to use ORM like mongoose in my past projects so are there any video tutorials or blog post regardng this ?
    r
    • 2
    • 1
  • d

    Daniel Norman

    09/16/2020, 3:47 PM
    I’ll be doing the final live stream of the modern backend series in 15 minutes. In this episode: continuous integration and deployment of the backed REST API to Heroku with GitHub actions and a small surprise.

    https://www.youtube.com/watch?v=kIKPcMwYFIc&ab_channel=Prisma▾

    Join in 😀
    🦜 6
  • n

    Neil Francis Nahid

    09/16/2020, 6:53 PM
    will prisma ever support active record pattern in the future?
    r
    • 2
    • 1
  • k

    KJReactor

    09/17/2020, 3:03 PM
    I'm using V2.7.0 and still have issues with
    migrate save
    . Error is no such table `_migration' when I do
    migrate up
    . I delete the database. Re-create it do
    migrate save
    . But once I do up i get the same the same error
    👀 1
    a
    • 2
    • 3
  • n

    Natalia

    09/17/2020, 3:03 PM
    🤗 “What’s new in Prisma (v2.7.0)” live stream is on now!* 

    Tune in▾

     *to learn about new releases, planned features, and other interesting bits from the Prisma world.
    prisma green 6
    fast parrot 7
  • j

    Jonathan

    09/17/2020, 11:18 PM
    Hey folks, I was wondering if anyone has an opinionated way of implementing an audit trail type of feature. Is this something you would use prisma for, with say a database trigger or some sort? Or more an API layer concern mostly?
    j
    • 2
    • 5
  • s

    stephan

    09/18/2020, 11:22 AM
    how to upgrade graphql package to 15.3.0 ?
    r
    • 2
    • 4
  • e

    Etel

    09/18/2020, 12:38 PM
    We just published a new article on Prisma’s Data Guide: Top 11 Node.js ORMs, Query Builders & Database Libraries in 2020 Would love to hear what you think. We hope that this will be useful across the board, not just for Prisma users 😄
    💯 2
    prisma rainbow 2
    👍 2
  • j

    Jeremy

    09/19/2020, 11:04 AM
    Hey there, I’m using the typescript graphql-auth example and trying to deploy it to Heroku however I have been having this error during the deployment. The api works fine locally and everything. Any help would be great! Thanks alot 🙂 My repo/code is here: https://github.com/southojere/modern-graphql-api-template
    r
    • 2
    • 1
  • t

    Thibault Jeanpierre

    09/19/2020, 1:33 PM
    Hi ! I have a problem with my application (Yoga Server + Prisma + GraphQL). I want to deploy my new Schema (3 months of Dev), with "prisma deploy" but I have this error :
    >prisma deploy
    !    'UNABLE_TO_VERIFY_LEAF_SIGNATURE':
    !    request to <https://api.cloud.prisma.sh/>
    !    failed, reason: unable to verify the first
    !    certificate
    Get in touch if you need help: <https://slack.prisma.io>
    To get more detailed output, run $ export DEBUG="*"
    (node:19452) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
    raven@2.6.4 alert: failed to send exception to sentry: unable to verify the first certificate
    I changed my computer. My application is deployed on Heroku and I paid a Dyno for my backend part, I do not know if the problem comes from the change of computer or the SSL that has been activated on Heroku. thank you
  • m

    Marvin

    09/19/2020, 4:32 PM
    Is there a way to rename an existing field in the
    schema.prisma
    file and keep the data on migration? I thought
    @map("oldFieldName")
    should work for that but it doesn't.
    r
    a
    • 3
    • 3
  • m

    MagmaStorm

    09/19/2020, 5:50 PM
    The 'Ask a Question' link on the GreetBot is broken. It takes to : https://github.com/prisma/prisma/discussions/new, which gives 'Page Not Found' error, the link should be : https://github.com/prisma/prisma/discussions Hope this helps 😄
    💯 2
    n
    • 2
    • 1
  • d

    Danilo

    09/20/2020, 4:09 AM
    Any way to create the migrations without the new experimental feature prisma migrate ?
    r
    • 2
    • 5
  • j

    Joe Graham

    09/20/2020, 5:25 PM
    hi there, wondering if it is idiomatic to deploy prisma as a serverless function or better to keep the node process alive? is there a recommended deployment (containerized process) or function or no recommendation as startup overhead is minimal and the application dictates the runtime requirements? worth pointing out i'm just getting started with prisma but didn't want to lose any runtime caching or other performance benefits by opting into functions by default
    r
    a
    • 3
    • 4
  • s

    Shaon

    09/21/2020, 7:49 AM
    Anyone here learning
    GraphQL
    now ? I'n going to start from scratch to learn core concept with advanced topics too 🔜
    r
    • 2
    • 2
  • k

    KJReactor

    09/21/2020, 2:10 PM
    How can I insert a new row and connect to an existing relation given a field that is not unique. I would use
    connectOrCreate
    but I don't want to create and the fields I'm searching on are not unique
    r
    • 2
    • 4
  • s

    Steve Jenkins

    09/21/2020, 7:07 PM
    Hi folks, technical question here. (Using version 2.6) I'd like to use an environmental variable in heroku to assign my prisma uri to the apollo client. I see in the docs that /graphql is appended to the url I give it and I need to know how to turn this off. I am running graphql on xyz.heroku.com not xyz.heroku.com/graphql. If I hard code the uri in (without the /graphql) it works as expected. Any suggestions are much appreciated 🙂 Here's a related (unanswered) SO post: https://stackoverflow.com/questions/54934559/heroku-config-var-undefined-during-server-side-rendering-with-next-js-apollo-c
    d
    • 2
    • 1
1...397398399...637Latest