Questions tagged [prisma]

Prisma is a next-generation Node.js and TypeScript ORM for PostgreSQL, MySQL, SQLite, CockroachDB, MongoDB and SQL Server.

Prisma is a next-generation ORM and can be used in any Node.js or TypeScript backend application (including serverless applications and microservices). This can be a REST API, a GraphQL API a gRPC API, or anything else that needs a database. Use the Prisma client to access your database with Node.js, TypeScript or Go.

Prisma features:

  • An auto-generated and type-safe client library
  • Declarative data modeling and migration system with Prisma Migrate
  • Beautiful data management workflows with Prisma Studio
3236 questions
1
vote
1 answer

Cannot download GraphQL schema from endpoint

I'm currently using graphql-cli from Prisma to download the schema from endpoint. But, even after I deploy the changes I made to my schema, which gets deployed successfully, whenever I try to download the schema, I get project prisma - No changes. …
Kevvv
  • 3,655
  • 10
  • 44
  • 90
1
vote
2 answers

'graphql' is not recognized as an internal or external command, operable program or batch file. While deploying prisma

I have a problem with prisma deploy command post-deploy: 'graphql' is not recognized as an internal or external command, operable program or batch file. I have tried any way to solve this trouble. I've changed, deleted, etc PATH var.proof that I've…
1
vote
1 answer

Unexpected : Can a graphql file only import other files and do nothing else?

I am using apollo-server-express to run my GraphQL server with a prisma database. My main schema is listed below, which just uses graphql-tag/loader to import other .graphql files. When I try to run my server locally, I get the following…
Jimmy
  • 3,090
  • 12
  • 42
  • 99
1
vote
1 answer

Prisma ORM how to create migration

I'm new to Prisma ORM, & I'm trying to make migrations in Prisma I see that I way to do this is to update data.model & then just run: prisma deploy But what if I want to create a migrations for specific versions of app how could I do that ??
Loki
  • 1,064
  • 2
  • 26
  • 55
1
vote
1 answer

What is the correct way to call multiple GraphQL mutations with Prisma and Apollo

I have the following database model type GlobalUser { email: String createdAt: DateTime! updatedAt: DateTime! } type Client { global_user: GlobalUser! createdAt: DateTime! updatedAt: DateTime! } Every time a GlobalUser is…
chris
  • 2,490
  • 4
  • 32
  • 56
1
vote
1 answer

Is any way to work arrays with nested objects in Prisma?

I'm new to Prisma, I have read the documentation and have done some small projects. Now I'm in a big project of an Architectural Application, but I am having issues with the schema of it. As you can see below, I have a type called GraphicColumn,…
Elias Ramirez
  • 25
  • 2
  • 5
1
vote
0 answers

Prisma2 cannot convert to or from a Postgres value of type `timestamptz`

I created all my Postgres tables using knex timestampz and now I get this error when trying to query anything. One possible solution is to convert all the columns to timestamp without timezone, but could I keep timezone and solve this error with…
Marcelo
  • 13
  • 5
1
vote
1 answer

How can I delete items with relations?

I'm using prisma2, and I don't know how to delete items having relations with other models. This is my models. model User { id String @default(cuid()) @id email String @unique password String name String teams Team[] …
Jeong
  • 25
  • 1
  • 3
1
vote
2 answers

Attach a property in context(request in express.js) object

I'm new to GraphQL, and I'm now trying to make an API server with express-graphql. What I want to do is add new property in context object for resolvers, which can be done when I initialize the express-graphql server instance. According to the…
cadenzah
  • 928
  • 3
  • 10
  • 23
1
vote
0 answers

Got error "Cannot return null for non-nullable field Joke.id" in Prisma2

I have a simple prisma.schema ⸺ model Joke { id String @default(cuid()) @id author Author content String @unique } model Author { id String @default(cuid()) @id name String jokes Joke[] } And this is my Query…
deadcoder0904
  • 7,232
  • 12
  • 66
  • 163
1
vote
1 answer

Implementing 3 way relationship in Prisma

I also asked this question on Prisma forum. ** EDIT **: The forum has since been locked as read-only just 1 day after my question. It's sure getting scary because there is no official announcement of whether they'll stop developing Prisma 1 after…
Daniel Cheung
  • 4,779
  • 1
  • 30
  • 63
1
vote
0 answers

Why do I get a missing file/folder error on a deployed Vue.js/Prisma app to Heroku?

I'm working on an app with a prisma and graphql-yoga server, and a Vue.js frontend. The project structure is shown in the linked image. My problem lies on the server side where I'm using ES6. The dev part has been alright, the deploy (to Heroku)…
Collins Orlando
  • 1,521
  • 4
  • 18
  • 25
1
vote
1 answer

How do I get around the "Invalid Token" problem using Prisma Secrets?

I’ve spent several hours scouring forums about how I can avoid the dreaded Your token is invalid. It might have expired or you might be using a token from a different project., but to no avail. My setup: Using prisma generate to make a Prisma…
freedomflyer
  • 2,431
  • 3
  • 26
  • 38
1
vote
2 answers

prismaObjectType usage produces a union type that is too complex to represent

I have a node project written in typescript with graphQl and prisma-nexus. the usage of prismaObjectType from import { prismaObjectType } from 'nexus-prisma' produces a union type that is too complex to represent. I can still use the project in dev…
poa
  • 269
  • 1
  • 4
  • 13
1
vote
2 answers

AWS ECS error in prisma container - environment variable PRISMA_CONFIG

I'm new to AWS, and I'm trying to deploy my local web app on AWS using ECR and ECS, but got stuck when running a cluster, it throws the error about the PRISMA_CONFIG environment variable in prisma container. In my local environment, i'm using docker…
Taniel Kong
  • 13
  • 1
  • 3