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

    KJReactor

    09/28/2020, 10:34 PM
    @fondfolio You need to read / get the data in the same order they were inserted?
    f
    c
    • 3
    • 6
  • m

    Moray Macdonald

    09/29/2020, 9:28 AM
    Morning all, where’s the best place to ask questions about
    graphql-middleware
    ?
    r
    n
    • 3
    • 3
  • n

    Natalia

    09/29/2020, 3:49 PM
    😁 GraphQL Berlin/Munich Meetup starts in 10 minutes! 

    Tune in on Youtube▾

    . 🎉
    prisma rainbow 4
    graphql 3
    prisma cool 3
  • m

    Matheus Assis

    09/29/2020, 6:47 PM
    Can nexus-prisma general questions also be asked in the slack? I'm confused on how to limit access to the "userId" fields of my query, using graphql-shield. To only allow the id if it's the logged user's. While using nexus-plugin-prisma.
    b
    • 2
    • 2
  • m

    mares29

    09/29/2020, 9:25 PM
    Hi guys. I have question about how to find the oldest One record from my DB?
    Copy code
    await prisma.posts.findOne({
      where: {oldest(updatedAt)} // ???
    })
    Thanks for any advice 😉
    b
    • 2
    • 3
  • a

    Ahmed

    09/29/2020, 11:39 PM
    Pal.Js version 2.0.1: Fixing many issues with many-to-many relation table Update to work with the new version from @prisma v2.8.0 https://twitter.com/pal4js/status/1311082888004358146
    prisma green 3
    💯 3
  • j

    Justin Ellingwood

    09/30/2020, 2:06 PM
    👋 Hey friends. Just a heads up: we have a new article in Prisma's Data Guide on transactions in PostgreSQL: https://www.prisma.io/dataguide/postgresql/inserting-and-modifying-data/using-transactions
    prisma green 2
    prisma rainbow 2
  • j

    Josef Henryson

    09/30/2020, 3:03 PM
    Hi, I am getting an error that I don’t know how to interpret. Checking the docker logs and see a lot of errors matching given request ID that looks like this:
    {"key":"error/unhandled","requestId":"local:ckfpi7y15corc0a36a22vlk6a","clientId":"default@default","payload":{"exception":"java.util.concurrent.RejectedExecutionException: Task slick.basic.BasicBackend$DatabaseDef$$anon$3@19ab3f35 rejected from slick.util.AsyncExecutor$$anon$1$$anon$2@195d2ec6[Running, pool size = 9, active threads = 9, queued tasks = 1000, completed tasks = 19478188]","query":"query ($where: RecruitmentWhereInput) {\n  recruitmentsConnection(where: $where) {\n    aggregate {\n      count\n    }\n  }\n}\n","variables":"{\"where\":{\"company\":{\"id\":\"ckfi0g67i7dyr0a36427kqxe5\"},\"state\":\"ACTIVE\"}}","code":"0","stack_trace":"java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063)\\n java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830)\\n java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379)\\n slick.util.AsyncExecutor$$anon$1$$anon$4.execute(AsyncExecutor.scala:161)\\n slick.basic.BasicBackend$DatabaseDef.runSynchronousDatabaseAction(BasicBackend.scala:265)\\n slick.basic.BasicBackend$DatabaseDef.runSynchronousDatabaseAction$(BasicBackend.scala:263)\\n slick.jdbc.JdbcBackend$DatabaseDef.runSynchronousDatabaseAction(JdbcBackend.scala:37)\\n slick.basic.BasicBackend$DatabaseDef.slick$basic$BasicBackend$DatabaseDef$$runInContextInline(BasicBackend.scala:242)\\n slick.basic.BasicBackend$DatabaseDef.runInContextSafe(BasicBackend.scala:148)\\n slick.basic.BasicBackend$DatabaseDef.runInContext(BasicBackend.scala:142)\\n slick.basic.BasicBackend$DatabaseDef.runInContext$(BasicBackend.scala:141)\\n slick.jdbc.JdbcBackend$DatabaseDef.runInContext(JdbcBackend.scala:37)\\n slick.basic.BasicBackend$DatabaseDef.runInternal(BasicBackend.scala:77)\\n slick.basic.BasicBackend$DatabaseDef.runInternal$(BasicBackend.scala:76)\\n slick.jdbc.JdbcBackend$DatabaseDef.runInternal(JdbcBackend.scala:37)\\n slick.basic.BasicBackend$DatabaseDef.run(BasicBackend.scala:74)\\n slick.basic.BasicBackend$DatabaseDef.run$(BasicBackend.scala:74)\\n slick.jdbc.JdbcBackend$DatabaseDef.run(JdbcBackend.scala:37)\\n com.prisma.api.connector.jdbc.impl.JdbcDataResolver.runAttached(JdbcDataResolver.scala:45)\\n com.prisma.api.connector.jdbc.impl.JdbcDataResolver.$anonfun$countByModel$1(JdbcDataResolver.scala:95)\\n com.prisma.metrics.micrometer.MicrometerTimerMetric.timeFuture(MicrometerMetrics.scala:64)\\n com.prisma.api.connector.jdbc.impl.JdbcDataResolver.performWithTiming(JdbcDataResolver.scala:98)\\n com.prisma.api.connector.jdbc.impl.JdbcDataResolver.countByModel(JdbcDataResolver.scala:95)\\n com.prisma.api.resolver.CountNodesDeferredResolver.resolve(CountNodesDeferredResolver.scala:10)\\n com.prisma.api.resolver.DeferredResolverImpl.$anonfun$resolve$5(DeferredResolverImpl.scala:93)\\n scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:233)\\n scala.collection.immutable.Map$Map1.foreach(Map.scala:125)\\n scala.collection.TraversableLike.map(TraversableLike.scala:233)\\n scala.collection.TraversableLike.map$(TraversableLike.scala:226)\\n scala.collection.AbstractTraversable.map(Traversable.scala:104)\\n com.prisma.api.resolver.DeferredResolverImpl.resolve(DeferredResolverImpl.scala:92)\\n sangria.execution.Resolver.sangria$execution$Resolver$$resolveDeferred(Resolver.scala:766)\\n sangria.execution.Resolver$ParentDeferredContext.$anonfun$init$4(Resolver.scala:1230)\\n sangria.execution.Resolver$ParentDeferredContext.$anonfun$init$4$adapted(Resolver.scala:1230)\\n scala.collection.Iterator.foreach(Iterator.scala:937)\\n scala.collection.Iterator.foreach$(Iterator.scala:937)\\n scala.collection.AbstractIterator.foreach(Iterator.scala:1425)\\n scala.collection.IterableLike.foreach(IterableLike.scala:70)\\n scala.collection.IterableLike.foreach$(IterableLike.scala:69)\\n scala.collection.AbstractIterable.foreach(Iterable.scala:54)\\n sangria.execution.Resolver$ParentDeferredContext.$anonfun$init$3(Resolver.scala:1230)\\n sangria.execution.Resolver$ParentDeferredContext.$anonfun$init$3$adapted(Resolver.scala:1229)\\n scala.util.Success.foreach(Try.scala:249)\\n scala.concurrent.Future.$anonfun$foreach$1$adapted(Future.scala:225)\\n scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)\\n akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)\\n akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:91)\\n scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)\\n scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:81)\\n akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:91)\\n akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40)\\n akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:44)\\n akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)\\n akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)\\n akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)\\n akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)","message":"Task slick.basic.BasicBackend$DatabaseDef$$anon$3@19ab3f35 rejected from slick.util.AsyncExecutor$$anon$1$$anon$2@195d2ec6[Running, pool size = 9, active threads = 9, queued tasks = 1000, completed tasks = 19478188]"}}
    Can anyone please guide me in the right direction? Thanks 🙏🏼
    r
    • 2
    • 11
  • e

    Etel

    09/30/2020, 4:19 PM
    Wroclaw TypeScript Meetup starts in 10 minutes! Daniel Norman, Prisma’s Developer’s Advocate, will give a talk: Rapid and type-safe Node.js development with Prisma - join on Zoom under this link
    🤗 1
  • n

    Natalia

    10/01/2020, 2:49 PM
    🤗 “What’s new in Prisma (v2.8.0)” live stream is starts in 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▾

    !
    🦜
    fast parrot 3
    🎁 2
    gopher exciting 2
    💯 4
    🤫 2
    prisma cool 3
    prisma green 3
    📺 2
  • k

    kmeillet

    10/02/2020, 2:59 AM
    Hello. I'm currently working on a legacy apps that used Graph.cool back in 2017. I don't know if it's the right place to call for help. I hope some member of the Prisma team that worked on Graph.cool are here 🙂 . It seem the Docker image graphcool/localfaas:0.11.1 has been deleted from Docker Hub : https://hub.docker.com/r/graphcool/localfaas/ doesn't exist anymore. Graph.cool is outdated and not supported anymore, Prisma is the new focus, I understand that. My compagny need to deploy a legacy apps that used Graph.cool, and we can't deploy because graphcool/localfaas:0.11.1 has been removed from Docker Hub recently. I suspect it's a misstake because the other Docker Image from Graph.cool still exist : https://hub.docker.com/u/graphcool Is it possible for anyone that worked previously on Graph.cool to restore the Docker Image ? Update : I solved this issue myself : export graphcool/localfaas:0.11.1 image as tarball from a previous deployment and then load into a new docker host to avoid Docker Hub round-trip, not the best way to solve this honestly but everything work. It would be nice to re-upload the image into Docker Hub but unfortunately I'm not the owner of "graphcool" account. If anyone need the Docker image, feel free to @ me on Discord (Arialpew#9125) or Slack if I'm online.
    👍 1
  • g

    Giorgio Delgado

    10/02/2020, 4:52 PM
    Hello! I'm currently transitioning from Prisma 1 over to Prisma 2 and see in the docs that I need to install
    @prisma/cli
    as a dev dependency, but I dont see any docs on whether I need to keep or remove
    prisma-client-lib
    from package.json
    n
    • 2
    • 1
  • g

    Giorgio Delgado

    10/02/2020, 4:52 PM
    can someone confirm if it's ok to remove
    prisma-client-lib
  • a

    Aaron Fulkerson

    10/04/2020, 1:10 AM
    Has there been any chat about adding multi-tenant functionality to Prisma using something like a PostgreSQL schema?
    n
    b
    • 3
    • 3
  • m

    Malik

    10/05/2020, 2:50 AM
    I'm new to Prisma and I'm just wondering if it's production ready
  • m

    Malik

    10/05/2020, 2:50 AM
    The migrations being experimental is kind of a big deal imo
  • m

    Malik

    10/05/2020, 2:51 AM
    I'm just getting started and I made a basic User model and made a few instances in studio
  • m

    Malik

    10/05/2020, 2:52 AM
  • m

    Malik

    10/05/2020, 2:52 AM
    Oddly enough I get the DB user postgres and not the actual model instances I specified in my schema after migration (1st migration btw)
  • m

    Malik

    10/05/2020, 2:54 AM
    Idk it just doesn't seem like it's working as expected and I'm not even sure if it's production ready
  • m

    Malik

    10/05/2020, 3:01 AM
    Ok I guess the migration stores it different in the DB? The client gets the data just fine
    a
    r
    • 3
    • 5
  • d

    David Ilizarov

    10/05/2020, 9:10 AM
    Using Prisma with Postgres. Have a question that is more modeling/DB related. I have a PaymentMethod model. A User can have multiple PaymentMethods. Only 1 can be default. On my PaymentMethod model, I have a
    default: boolean
    . The model also has a
    userId: number
    since it belongsTo a User. For any userId on the PaymentMethod, only 1 PaymentMethod can be
    true
    . Any simple way to manage this? Right now in my API calls, if a user wants to make a PaymentMethod default, I just query for that PaymentMethod and the current default PaymentMethod and set one to true and the other to false. It is simple, basic and works, but curious to explore other options that can make this type of situation even simpler for me.
    🙌 1
    j
    a
    • 3
    • 3
  • a

    Amit Gupta

    10/05/2020, 12:21 PM
    How soon you guys are planning to release support for multiple schemas in prisam2?
    r
    • 2
    • 3
  • j

    Joe

    10/05/2020, 3:49 PM
    are you using global on node like this: npm config set strict-ssl false --global looks like your app/firewall is protecting from a middle. I really wish there was a prototyping mode. The other thing that it might be a dependency triggering, so: set NODE_TLS_REJECT_UNAUTHORIZED=0 maybe that can get you some headway.
  • c

    Chaphasilor

    10/05/2020, 4:30 PM
    Hey, I have an issue with prisma 🙂 I'm trying to set up https://github.com/mikecao/umami on a Raspberry Pi 4 (arm64, running in 32-bit mode). The problem is, there are no precompiled binaries for arm (see https://github.com/prisma/prisma/issues/861 ). So I've now compiled them myself and have them available on my machine. But when I run
    npm run build
    on umami, prisma stll tries to download prebuilts, and fails with a fatal error because of the 404. This shouldn't be happening, because I have the environment variables set to point to my binaries (see https://github.com/prisma/prisma/issues/1329 ). Here's the output when installing:
    Copy code
    Database type detected: postgresql
    Copied /home/code/umami/prisma/schema.postgresql.prisma to /home/code/umami/prisma/schema.prisma
    
    > umami@0.74.0 build-db-client /home/code/umami
    > dotenv prisma generate
    
    Environment variables loaded from prisma/.env
    Warning Precompiled binaries are not available for arm.
    > Downloading Prisma engines for arm-openssl-1.1.x [                    ] 0%Error: Not Found <https://binaries.prisma.sh/all_commits/e6c9b4b2b7fa162d0d459d1863321f547498fcfe/arm-openssl-1.1.x/prisma-fmt.gz>
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! umami@0.74.0 build-db-client: `dotenv prisma generate`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the umami@0.74.0 build-db-client script.
  • c

    Chaphasilor

    10/05/2020, 4:31 PM
    And here are the contents of
    prisma/.env
    :
    Copy code
    PRISMA_QUERY_ENGINE_BINARY=/home/code/prisma-engines/target/release/query-engine
    PRISMA_INTROSPECTION_ENGINE_BINARY=/home/code/prisma-engines/target/release/introspection-engine
    PRISMA_MIGRATION_ENGINE_BINARY=/home/code/prisma-engines/target/release/migration-engine
  • c

    Chaphasilor

    10/05/2020, 4:32 PM
    You can see that the envvars are loaded:
    Environment variables loaded from prisma/.env
  • c

    Chaphasilor

    10/05/2020, 4:35 PM
    Any ideas how to fix this?
  • n

    Natalia

    10/05/2020, 6:02 PM
    🙌 TSConf 2020 goes live this Friday, October the 9th! Tim Suchanek, Prisma’s Software Engineer will give a talk and you can also take part in a workshop by Ryan Chenkie - our Developer Advocate. Grab a ticket here: https://tsconf.io 🙌
    💯 1
    🎟️ 3
    prisma green 1
  • y

    Yann Pringault

    10/05/2020, 7:14 PM
    Hello everyone, I have a question about a production setup to handle database connection in a Next.js app (deployed on Vercel) with Prisma. Where is the best place to ask? Thanks 🙂
1...399400401...637Latest