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

    Lars Ivar Igesund

    09/23/2020, 8:51 AM
    I have an application built on top of the nexus-prisma generated GraphQL API, served using Apollo. So far I have managed with the CRUD operations + some additional Queries. However, I want to add some server side logic to some of the mutations, that is, given certain data in a mutation, change something else or do something else (e.g send email). I don't find any good examples of this, although I assume making a custom resolver is the way to go about it.
  • l

    Lars Ivar Igesund

    09/23/2020, 9:08 AM
    Never mind, I see that a custom resolver is the easy way to go about it
    đź’Ż 1
  • l

    Lars Ivar Igesund

    09/23/2020, 12:05 PM
    Ok, similar, but different question. On a specific create Mutation, I want to add an input field that results in some additional stuff to be generated. It doesn't make entirely sense I think to add it to the object, since it is not a relevant field to read out later. How will I go about doing that? A custom write-only field so to speak.
  • l

    Lars Ivar Igesund

    09/23/2020, 12:15 PM
    ah, maybe prismaInputObjectType?
  • t

    totetsumonai

    09/24/2020, 6:47 AM
    Hi, is there any way to transaction manually in prisma1? (not nested mutation)
    r
    • 2
    • 1
  • m

    Moray Macdonald

    09/30/2020, 4:39 PM
    Hi, I’m trying to figure out some performance issues with our application, and I’m seeing a huge variance in how long it’s taking to retrieve data. Sometimes querying a type will take 2 seconds, sometimes 0.02! Any ideas what we should be looking for?
    👍 1
  • l

    Lars Ivar Igesund

    09/30/2020, 6:16 PM
    I have a type Process that is exposed via GraphQL to react-admin, using @weakky/@Marc-Antoine dataprovider. I would then like to add parameters to update and create that are not stored in the database. I am able to update e.g. ProcessCreateInput to have the relevant fields such that they show up in the GraphQL schema, but the resource handling in ReactAdmin is based on just Process. This seems to cause the additional fields to be lost en route to the server. Is there some solution on the server side, or is this a limitation in the data provider perhaps?
    m
    s
    • 3
    • 33
  • k

    khareta

    10/01/2020, 10:02 AM
    Hello, we started getting these errors all of a sudden:
    Copy code
    Uncaught Error: Directive "isAuthenticated" may not be used on FIELD_DEFINITION.
    
    Directive "isAuthenticated" may not be used on FIELD_DEFINITION.
    
    Directive "isAuthenticated" may not be used on FIELD_DEFINITION.
    
    Directive "hasRole" may not be used on FIELD_DEFINITION.
    
    Directive "isAuthenticated" may not be used on FIELD_DEFINITION.
    what's going on?
    s
    • 2
    • 9
  • m

    Moray Macdonald

    10/02/2020, 8:09 AM
    Anyone seen this before or know what might be causing it? Is it something in our application or does prisma1 include caching or dataloading that might be causing this?
  • l

    Lars Ivar Igesund

    10/07/2020, 7:20 AM
    I haven't tried the prisma admin dashboard for a while on my local setup, but now I inexcplicably get what looks like GraphQL playground instead, although without any schemas to work with. Going to localhost:4466
    r
    • 2
    • 2
  • l

    Lars Ivar Igesund

    10/07/2020, 7:23 AM
    Hmm, seems like I probably have a routing issue
  • l

    Lars Ivar Igesund

    10/07/2020, 7:24 AM
    It actually gives me the playground from my application (which normally lives at :4000)
  • l

    Lars Ivar Igesund

    10/07/2020, 7:28 AM
    So if I tack on /default/default/_admin I get there, but I'm a bit confused as I'm pretty sure I didn't need to do that in the past. Could there be some configuration that I have messed up?
  • l

    Lars Ivar Igesund

    10/07/2020, 7:54 AM
    Ok, so just opening up one of my collections (mongo database) in prisma admin, I get an error on a null value that shouldn't be there. The collection has 4 required fields though, so how do I figure out which one?
    • 1
    • 2
  • g

    Gabriel Oliveira

    10/07/2020, 11:03 PM
    Hey everyone Is there a way to run the graphiql tool on my browser from an app deployed to heroku?
  • g

    Gabriel Oliveira

    10/07/2020, 11:04 PM
    graphiql tool / graphql playground (the one that you can run locally by accessing localhost:4000)
    r
    • 2
    • 2
  • l

    Lars Ivar Igesund

    10/12/2020, 2:33 PM
    Posted this in wrong channel, but it is about Prisma 1: Do anyone know of the arrayFilters usage in the prisma mongo driver? Our database in testing seems to be older than the introduction of that feature, causing issues. The curious bit is that I am pretty sure that this didn't happen prior to a schema update I had. I am sortof presuming that more array updates are now done since the schema update created more relational links (but the old version weren't free of it either ...)
  • g

    Gabriel Oliveira

    10/13/2020, 2:28 AM
    How should i setup my project on a production environment to call the prisma deploy command after I have made changes locally on dev environment, but now after I push my code I need the server to be updated too? (https://v1.prisma.io/docs/1.34/prisma-cli-and-configuration/cli-command-reference/prisma-deploy-xcv9/) Would that be by adding something to the post deploy hooks on prisma.yaml file or manually ran on the server somehow (I'm using heroku)
    r
    n
    • 3
    • 15
  • l

    Lars-Jørgen Kristiansen

    10/14/2020, 11:40 AM
    I have a self refrencing relationship that i want to change from one-to-one to one-to-many.. Prisma tells me
    ! You already have nodes for this model. This change may result in data loss.
    Why is this breaking? i.e. going from this:
    Copy code
    type Node {
      parent: Node @relation(name: "NodeParentChildren", link: INLINE)
      chilldren: Node @relation(name: "NodeParentChildren")
    }
    To this:
    Copy code
    type Node {
      parent: Node @relation(name: "NodeParentChildren", link: INLINE)
      chilldren: [Node!]! @relation(name: "NodeParentChildren")
    }
    r
    • 2
    • 5
  • t

    tmoney

    10/14/2020, 2:55 PM
    Anyone currently doing application performance monitoring with Prisma 1? Have any suggestions of where we could start or tools we may not know about yet, or any experience you’ve had so far with certain tools?
  • t

    tmoney

    10/14/2020, 2:57 PM
    Right now we have Heroku’s out of the box monitoring and that’s about it for knowing how long things are taking, but we are trying to figure out how to more granularly analyze and dig into which queries/mutations are taking the longest kinda thing.
    l
    l
    • 3
    • 3
  • d

    David Gwon

    10/20/2020, 1:53 AM
    anybody help me
  • d

    David Gwon

    10/20/2020, 1:53 AM
    I have a question
    s
    • 2
    • 7
  • l

    Lars-Jørgen Kristiansen

    10/20/2020, 3:54 PM
    Is it possible to use pgbouncer with prisma1?
  • d

    Daniel Uhm

    10/27/2020, 4:58 AM
    Hello. Currently, our company is using Prisma 1. Currently, our service is using ECS-based Prisma 1 by clustering 10 units. The CPU usage is higher than I thought, so even though I’m using the 4vCore 8Gb peak performance, I keep getting the error below.
    Copy code
    [INFO] Fatal error during deployment worker initialization: akka.pattern.AskTimeoutException: Ask timed out on [Actor[<akka://single-server/user/$e#1930414073>]] after [300000 ms]. Sender[null] sent message of type "com.prisma.deploy.migration.migrator.DeploymentProtocol$Initialize$".
    akka.pattern.AskTimeoutException: Ask timed out on [Actor[<akka://single-server/user/$e#1930414073>]] after [300000 ms]. Sender[null] sent message of type "com.prisma.deploy.migration.migrator.DeploymentProtocol$Initialize$".
    	at akka.pattern.PromiseActorRef$.$anonfun$defaultOnTimeout$1(AskSupport.scala:596)
    	at akka.pattern.PromiseActorRef$.$anonfun$apply$1(AskSupport.scala:606)
    	at akka.actor.Scheduler$$anon$4.run(Scheduler.scala:205)
    	at scala.concurrent.Future$InternalCallbackExecutor$.unbatchedExecute(Future.scala:870)
    	at scala.concurrent.BatchingExecutor.execute(BatchingExecutor.scala:109)
    	at scala.concurrent.BatchingExecutor.execute$(BatchingExecutor.scala:103)
    	at scala.concurrent.Future$InternalCallbackExecutor$.execute(Future.scala:868)
    	at akka.actor.LightArrayRevolverScheduler$TaskHolder.executeTask(LightArrayRevolverScheduler.scala:328)
    	at akka.actor.LightArrayRevolverScheduler$$anon$4.executeBucket$1(LightArrayRevolverScheduler.scala:279)
    	at akka.actor.LightArrayRevolverScheduler$$anon$4.nextTick(LightArrayRevolverScheduler.scala:283)
    	at akka.actor.LightArrayRevolverScheduler$$anon$4.run(LightArrayRevolverScheduler.scala:235)
    	at java.lang.Thread.run(Thread.java:748)
    It turns out that EKS works much more reliably to cluster than ECS, so we are building a new one EKS, but similar errors occur. I wonder if the database is twisted, but I don’t know how to fix it. Can anyone help? Using Prisma 2 would be ideal, but as redevelopment is going on soon, I can’t change much. Thank you.
    r
    s
    • 3
    • 3
  • s

    Steven

    10/29/2020, 1:17 AM
    Hey hi guys, how I can search a value in a collection using prisma and MongoDB?
    r
    • 2
    • 2
  • k

    khareta

    10/31/2020, 8:50 PM
    Hello, I was deploying a prisma 1.13 project when I suddenly redirected to a prisma page for auth, I authed with github(not sure if that account actually is connected to prisma), and then received this error:
    Copy code
    ERROR: Variable "$input" got invalid value {"workspaceSlug":null,"clusterName":"default","serviceName":"default","stageName":"default"}; Expected non-nullable type String! not to be null at value.workspaceSlug.
    
    {
      "errors": [
        {
          "message": "Variable \"$input\" got invalid value {\"workspaceSlug\":null,\"clusterName\":\"default\",\"serviceName\":\"default\",\"stageName\":\"default\"}; Expected non-nullable type String! not to be null at value.workspaceSlug.",
          "locations": [
            {
              "line": 2,
              "column": 17
            }
          ],
          "code": 222
        }
      ],
      "status": 400
    }
    any help?
  • k

    khareta

    11/01/2020, 10:26 AM
    The above issue was solved when I matched cli version to server's, 1.13 but now I get 403 FORBIDDEN
    Copy code
    ERROR: GraphQL Error (Code: 403)
    
    {
      "error": "<html>\r\n<head><title>403 Forbidden</title></head>\r\n<body>\r\n<center><h1>403 Forbidden</h1></center>\r\n</body>\r\n</html>\r\n",
      "status": 403
    }
    although I'm using the same managementApSecret we use for production!
  • k

    khareta

    11/01/2020, 10:50 AM
    I have solved the above as well, the request was getting blocked for a size constraint. Now the
    Copy code
    graphql get-schema --project database
    command is not getting the updated schema, and since we use an old version of prisma, then prisma generate is not available to use. Any workarounds for this?
  • k

    khareta

    11/01/2020, 11:08 AM
    SOLVED! how? I created a new type:
    Copy code
    type Lol {
    name: String
    }
    ran deploy then get schema then removed Lol type then deploy !
    đź’Ż 2
12345...10Latest