Questions tagged [prisma-graphql]

Prisma turns your database into a GraphQL API.

Prisma lets you design your data model and have a production ready GraphQL API online in minutes.

The Prisma GraphQL API provides powerful abstractions and building blocks to develop flexible, scalable GraphQL backends.

416 questions
6
votes
0 answers

How to pass environment variables running Prisma server in a single docker container

The docker-compose.yml example contained in the docs works great for local development where people probably have multiple services run with docker: version: '3' services: prisma: image: prismagraphql/prisma:__LATEST_PRISMA_VERSION__ …
Ric0
  • 620
  • 6
  • 11
6
votes
5 answers

CORS blocks mutation in GraphQL Yoga

I am working here with a graphql prisma backend and a graphql yoga express server on top of that. In the frontend, I am trying to call a signout mutation but its blocked by the CORS policy. Though I have added cors settings in my graphql yoga…
arvind
  • 778
  • 1
  • 9
  • 16
6
votes
2 answers

Include relationship when querying node using Prisma generated wrapper

I am following the GraphQL Prisma Typescript example provided by Prisma and created a simple data model, generated the code for the Prisma client and resolvers, etc. My data model includes the following nodes: type User { id: ID! @unique …
tacos_tacos_tacos
  • 10,277
  • 11
  • 73
  • 126
5
votes
4 answers

How to access object.id in update mutation in react, graphql with prisma

I am trying to figure out how to access the object.id on the update mutation I have made in my app. I have an object called IssueGroup. I have made create and delete mutations and for the most part, they work okay. I'm getting stuck with the update…
Mel
  • 2,481
  • 26
  • 113
  • 273
5
votes
1 answer

Many-to-many Self Relation Prisma - One Field

I'm trying to create a friendship mechanic for my app using Prisma among other tools. In the docs it shows the following example for how to create a many-to-many self relation: model User { id Int @id @default(autoincrement()) name…
JSim
  • 117
  • 5
5
votes
3 answers

Polymorphism in Prisma Schema - Best practices?

This is more a design question than a coding question. Suppose the following schema: // schema.prisma // Solution 1 model Entity { id Int @id @default(autoincrement()) attrs EntityAttr[] } model EntityAttr { id Int …
buzzysin
  • 311
  • 3
  • 12
5
votes
0 answers

Query engine binary for current platform "debian-openssl-1.0.x" could not be found

I need help on Dockerize my Prisma + GraphQL, I have tried many more options and tricks to resolve this issue but can not able to make it work. Seems like when I actually run the application without Dockerize application work perfectly like…
ankitkanojia
  • 3,072
  • 4
  • 22
  • 35
5
votes
1 answer

Prisma doesn't generate files when running prisma init

Running prisma init does not generate files. It not generates the 3 files below. datamodel.graphql docker-compose.yml prisma.yml end up getting this error:- { "errors": [ { "message": "Project not found: 'graphiql@default'", …
Dhaval Parmar
  • 241
  • 1
  • 3
  • 13
5
votes
1 answer

What Does '?' Mean When Defining Prisma Schema Model?

In this example, we see: name String? Not completely sure on what the ? signifies here...
CodeFinity
  • 1,142
  • 2
  • 19
  • 19
5
votes
4 answers

Prisma throws an error "TypeError: cannot read property findmany of undefined"

I wanted to make a chat app to practice working with graphql and node, for database I used prisma. I was doing everything like in this tutorial. https://www.howtographql.com/graphql-js/0-introduction/ I just changed variable names. so I have this…
Yunus Sitdikov
  • 99
  • 1
  • 1
  • 5
5
votes
0 answers

Prisma: Is there any way to execute javascript as default value of prisma data type?

in my data model, as the type of id, I want to generate a default value that will start with the user. so the id will bed something like this user..rear33422qeqr type User { myId: String! @default (`user${2+2}`) name: String! email: String!…
Ashik
  • 2,888
  • 8
  • 28
  • 53
5
votes
2 answers

Subscriptions not working with Prisma 2 and Nexus?

Subscriptions with Nexus are undocumented but I searched Github and tried every example in the book. It's just not working for me. I have cloned Prisma2 GraphQL boilerplate project & my files are as follows: prisma/schema.prisma datasource db { …
deadcoder0904
  • 7,232
  • 12
  • 66
  • 163
5
votes
3 answers

Getting Internal Server Error on prisma deploy

I have a Postgres database on Heroku, upon deploying the data model by doing prisma deploy often times the following error is produced. ERROR: Whoops. Looks like an internal server error. Search your server logs for request ID:…
Neeraj Sewani
  • 3,952
  • 6
  • 38
  • 55
5
votes
2 answers

cannot write a mutation with an array of strings

Cannot use set in graphql playground with list scalar type. I have created my Prisma datamodel.graphql and deployed it. One of the fields in my Exercise type is a list of movements. I used the list scalar type to define this field, and wrote the…
5
votes
0 answers

Project not found: 'my-app@dev'

I am following https://www.graph.cool/docs/1.0/quickstart/backend/typescript/typescript-rohd6ipoo4 for graphcool and I an getting the error { "errors": [ { "code": 3016, "requestId": "api:api:cjc7gf91e002v0180uq2hqace", "message":…
Niks
  • 885
  • 1
  • 7
  • 17
1 2
3
27 28