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

    Pieter

    11/10/2020, 9:38 PM
    With the new nativeTypes preview, does it mean we can use postgres types like Interval?
    r
    • 2
    • 1
  • m

    Manthan Mallikarjun

    11/11/2020, 3:21 AM
    Are there any new updates with how to test with Prisma? 1. Currently I mock each response (I suppose thats unit testing) 2. Is it possible to start a global transaction and cancel it after the test? (This would be more like integration testing I guess but thats how Rails/Django do it) 3. Any plans for factories?
    r
    • 2
    • 1
  • h

    Harrison Ekpobimi

    11/11/2020, 9:05 AM
    Hello Guys We use prisma 1 at where i work and we ran into an issue which we find hard to resolve. we added a new field to a model we running the yarn deploy command we had this error which prevents the field from beign added. Any help will be appreciated
    Copy code
    ERROR: Variable "$input" got invalid value {"workspaceSlug":null,"clusterName":"default","serviceName":"new-leaders","stageName":"develop"}; Expected non-nullable type String! not to be null at value.workspaceSlug.
    {
      "errors": [
        {
          "message": "Variable \"$input\" got invalid value {\"workspaceSlug\":null,\"clusterName\":\"default\",\"serviceName\":\"new-leaders\",\"stageName\":\"develop\"}; Expected non-nullable type String! not to be null at value.workspaceSlug.",
          "locations": [
            {
              "line": 2,
              "column": 17
            }
          ],
          "code": 222
        }
      ],
      "status": 400
    }
    r
    • 2
    • 5
  • j

    Jijin P

    11/11/2020, 11:39 AM
    Hey Is there any way to perform this query? I have seen atomic operations on the update, does that exist on findMany?
    Copy code
    await prisma.offers.findMany({
            where: {
                status: {
                    lt: offers.statusValue //based on any other field on that table
                }
            }
        })
    r
    • 2
    • 5
  • s

    stevefan1999

    11/11/2020, 5:50 PM
    hi, i wonder what's the best way now to integrate prisma with graphql? i know that prisma 2 is just a query engine now and not like the old days and some graphql operation is offloaded to something like nexus but it just feels unnatural
    n
    j
    +2
    • 5
    • 9
  • s

    stevefan1999

    11/11/2020, 5:50 PM
    i really liked that prisma SDL -> graphql API direct design
  • s

    stevefan1999

    11/11/2020, 5:51 PM
    it was because prisma go away from this model i changed to hasura, but hasura is also somewhat limiting as well (e.g. websocket is actually live refresh which is not strictly pubsub)
  • s

    Spencer Curry

    11/11/2020, 6:43 PM
    anyone here deploy their prisma API via Google Cloud Services? I'm attempting to get running on the App Engine and am hitting an error. I'm wondering if I should move to Cloud Engine to boot up a VM.
    Copy code
    Updating service [default] (this may take several minutes)...failed.
    ERROR: (gcloud.app.deploy) Error Response: [9]
    Application startup error! Code: APP_CONTAINER_CRASHED
    > med-planner-server@1.0.0 start /app
    > node ./graphql/index.js
    /app/node_modules/.prisma/client/index.js:3
        throw new Error(
        ^
    Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
    r
    • 2
    • 3
  • o

    Omar Harras

    11/11/2020, 11:08 PM
    hi everyone, I have a weird behavior on my query that returns a list of Albums, with an artist relation. I got null on artist field : here is my query and the schema :
    Copy code
    // query 
    query {
      allAlbums {
        name
        artist {
          id
          lastName
        }
      }
    }
    
    // schema
    model Artist {
      id        String  @id @default(cuid())
      firstName String
      lastName  String
      stageName String
      cover     String
      age       Int?
      biography String?
      song      Song[]
      album     Album[]
    }
    
    model Album {
      id       String  @id @default(cuid())
      name     String
      cover    String
      genre    Genre?  @default(POP)
      artistId String?
      artist   Artist? @relation(fields: [artistId], references: [id])
    }
    the query returns a list of albums but Artist is null, knowing that I have the artistId in the albums table in db… anyone can help please ?
    d
    r
    • 3
    • 7
  • m

    Mike Dietz

    11/12/2020, 8:45 AM
    I am trying set up prisma with a remote MySQL database, connection and credentials are verified through mysql-client. Nevertheless, I get the error message: _java.sql.SQLSyntaxErrorException: (conn=1446758) Access denied for user 'maraxaic_graphql'@'87.187.51.%' to database 'prisma'_. I assigned all available permissions to this user through my host provider. I notice that the error message mentions the database 'prisma' but my database name is maraxaic_graphql. 'prisma' does not exist on my host. Any help is greatly appreciated, thanks in advance.
    r
    • 2
    • 18
  • c

    Christopher Yovanovitch

    11/12/2020, 10:24 AM
    Hello I’ve upgraded to the latest prisma and now when I tried to migrate I get this .. what should I do. Thanks
  • c

    Christopher Yovanovitch

    11/12/2020, 10:24 AM
    r
    j
    • 3
    • 6
  • n

    Natalia

    11/12/2020, 3:52 PM
    prismo gif “What’s new in Prisma (v2.11.0)” live stream is starts in less than 10 minutes! Once again, Ryan and Niko from Prisma talk about new releases, planned features and other interesting bits from the Prisma world - this time they are also joined by a surprise guest! 

    Tune in here▾

    !
    prisma cool
    prisma rainbow 6
    prisma green 3
    fast parrot 5
  • j

    Justin Ellingwood

    11/12/2020, 4:44 PM
    A new guide on managing privileges in MySQL using roles is up on Prisma's Data Guide: https://www.prisma.io/dataguide/mysql/authentication-and-authorization/role-management
    💯 5
    🦜 2
  • m

    Marvin

    11/12/2020, 8:17 PM
    I have a postgres database on heroku and want to try out the new
    prisma migrate
    . When I run it, I get a "permission denied to create database" error. Sounds reasonable for me because the database isn't mine but why wants prisma to create a new database instead of the tables?
    r
    j
    • 3
    • 5
  • u

    ינון אלבז

    11/13/2020, 8:50 AM
    any idea?
    j
    r
    • 3
    • 3
  • s

    Samrith Shankar

    11/13/2020, 10:20 AM
    Hey, is there any way I can do something like this:
    Copy code
    # schema.prisma
    
    datasource db {
        provider = "postgresql"
        url      = "file:./test.db"
    }
    For postgres? I need to create a mock db for tests in order to not pollute production database. Right now I am getting this error (which is clear):
    Copy code
    Error validating datasource `db`: The URL for datasource `db` must start with the protocol `postgresql://`
    r
    • 2
    • 2
  • m

    Mike Dietz

    11/13/2020, 11:09 PM
    Prisma2 warns that installing globally can cause trouble. Well, that happened to me. While experimenting with different installations of v1 and v2, somehow my system got messed up. Now, when I install a version with npm, the installation is successfully completed, the nodes_modules are created and the package.json list the version but I cannot initialize a project. When I run 'prisma -v' or 'prisma2 -v' no installation is recognized. What can I do?
    n
    r
    • 3
    • 2
  • c

    cellograph

    11/14/2020, 8:19 AM
    Facing a problem with Prisma vscode plugin, auto formatting doesn't working and shows error: The prisma language server crashed 5 times.... Both are latest version. Any solution?
    m
    c
    • 3
    • 2
  • j

    Joshua_Oxner

    11/14/2020, 1:28 PM
    Anybody have any success with implementing a timestamp using custom data type into prisma using postgresql?
    r
    • 2
    • 1
  • b

    Ben Schwartz

    11/16/2020, 2:38 PM
    How "experimental" is the Transaction API? Is it solid enough to rely on? I don't need to do complex things with it, just creations.
    j
    r
    • 3
    • 4
  • n

    Natalia

    11/16/2020, 5:35 PM
    🙌 Tomorrow at 6PM CET you can catch Jason Kuhrt, Software Developer at Prisma, giving a talk titled Introduction to Nexus Schema at the Node.js Wroclaw Meetup! You can

    set a reminder on YouTube▾

    here or RSVP to the event on Meetup. graphqlfast parrotprisma cool
    node parrot 2
    nexus 2
    prisma rainbow 1
    🦜 3
  • s

    Spencer Curry

    11/16/2020, 8:38 PM
    hey yall, i'm trying to boot up prisma studio on a container instance on google cloud platform and im having some issues getting it to run
  • b

    bntzio

    11/16/2020, 11:32 PM
    Does anyone know what’s the best approach to reset everything (migrations, tables, prisma generated schemas, etc) ?
    k
    r
    j
    • 4
    • 6
  • k

    KJReactor

    11/17/2020, 1:33 AM
    Can anyone please tell me what is wrong with this query?
    Copy code
    _const_ _user = await _prisma_.user.findMany({
            where: {
              OR: [
                { email: {equals: _email_} },
                { phone: {equals: _phone_} }
              ]
            },
    take: 1
    for some reason result that don't satisfy either conditions
    r
    • 2
    • 35
  • n

    Natalia

    11/17/2020, 4:46 PM
    fast parrot Jason is ON in 15 minutes with his Introduction to Nexus Schema - at the Node.js Wroclaw Meetup.

    Tune in on YouTube here▾

    . graphqlnode parrot
    prisma rainbow 3
    💯 3
  • m

    Mike Dietz

    11/17/2020, 5:01 PM
    How do the following two old-type-datamodel type definitions translate to the new datamodel (prisma 1.34.10)?
    author: User! @relation(name: "UserToPost", onDelete: SET_NULL)
     
    comments: [Comment!]! @relation(name: "CommentsToPost", onDelete: CASCADE)
  • m

    Marvin

    11/17/2020, 5:46 PM
    Hey! How would you save the connection/relation between the old & new model when changing a model's name? I know it's not possible with Prisma to do that kind of things but when I would implement that on my own, how could I do that? I have an idea to store the table names in a migration-like database table, any thoughts on this? Would be cool to hear some opinions/feedback. 🙂
    r
    a
    • 3
    • 12
  • d

    Drew Fleming

    11/17/2020, 7:40 PM
    Greetings all 🙂 I am experimenting with SQL Server and Prisma using the preview connector. I was able to follow the tutorial and introspect the db and generate... All is well there. Now I want to use that connection as part of docker-compose (
    prismagraphql/prisma:1.34
    image) so I can use the playground with SQL Server, but it fails for
    unknown connector
    when running
    docker-compose up -d
    (I tried 'sqlserver'). Is this supported, and if not, does anyone know of a way to create a GraphQL playground?
    n
    • 2
    • 9
  • l

    Lasse Abelsen

    11/18/2020, 12:01 PM
    Hi Everyone. Has anyone experienced an error with the playground with "could not find config" ? It's a really odd error, that some of my users experience. I'm unable to reproduce it, and it's only a few people who gets it, but it's blocking those users comepletely.
    👍 1
    a
    • 2
    • 3
1...404405406...637Latest