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
4 answers

Cannot query field 'password' on type 'User' graphql

I'm using graphql and prisma. datamodel.prisma type User { id: ID! @id createdAt: DateTime! @createdAt updatedAt: DateTime! @updatedAt email: String! @unique password: String! first_name: String } schema.graphql scalar Date type Query…
demkovych
  • 7,827
  • 3
  • 19
  • 25
1
vote
1 answer

Connection Error accessing postgres docker container

I setup a prisma project recently and here is my docker-compose.yml file version: '3' services: prisma: image: prismagraphql/prisma:1.31 restart: always ports: - '4030:4466' environment: TZ: ${PRISMA_DB_TIME_ZONE} …
Dulara Malindu
  • 1,477
  • 4
  • 18
  • 37
1
vote
0 answers

i am running prisma deploy , it show me error Could not connect to server at http://localhost:3000. Please check if your server is running

Could not connect to server at http://localhost:3000. Please check if your server is running. Get in touch if you need help: https://spectrum.chat/prisma To get more detailed output, run $ export DEBUG="*" I am running on windows 10 home , I…
1
vote
0 answers

Single post query shows "Cannot return null for non-nullable field" error when multiple post query is working fine

My query for a single post shows Cannot return null for non-nullable field Post.author error message when I include the author field, both from React as well as the Playground. It's working fine for the posts query which queries for multiple…
Kevvv
  • 3,655
  • 10
  • 44
  • 90
1
vote
1 answer

Syntax Error Error When Trying to Start GraphQL Yoga Server

I'm trying to run my GraphQL Yoga server but it's complaining about a syntax error in my db.js file: GraphQLError: Syntax Error: Cannot parse the unexpected character ".". const { Prisma } = require("prisma-binding"); const db = new Prisma({ …
maxwellgover
  • 6,661
  • 9
  • 37
  • 63
1
vote
1 answer

Prisma deploy embedded in two fields error like bug

I would like to have two colums with the same type of data from and to this is a very simple example about the error datamodel.prisma file with a one columns from: Address! // it runs fine type Travel { id: ID!…
Rolly
  • 3,205
  • 3
  • 26
  • 35
1
vote
3 answers

The Mongo connector currently does not support Cascading Deletes

I'm working with Prisma and I want to support CASCADE delete but although I have done everything mentioned in the docs I'm still not getting it to work this is the error I'm getting when I try to Prisma deploy Errors: Restaurant ✖ The Mongo…
1
vote
1 answer

How to setup passport.js with graphql-yoga (prisma)

how to setup passport.js with google-auth using graphql-yoga(prisma). If somone want to help me please describe all setps you took to setup , thanks for responses.
Kuba Kluzniak
  • 422
  • 1
  • 8
  • 18
1
vote
1 answer

fliend createdAt in Prisma schema returns a null value when createUser() is called

When including a createdAt field in my datamodel.prisma schema the DateTime! returns a null value. I am raising this on here so that if anyone else has the same problem, hopefully they will be able to find this post. // in datamodel.prisma type User…
Matthew Player
  • 318
  • 4
  • 17
1
vote
1 answer

TypeError: Cannot read property 'createProduct' of undefined ? (from graphql mutation.js file)

When I write the same queries for my public facing API (localhost) I get the error : TypeError: Cannot read property 'createProduct' of undefined at createProduct (/Users/gavish/Desktop/Final…
1
vote
2 answers

How to do multiple nested query (GET request) with GraphQL Yoga?

How can I do multiple nested query using GraphQL Yoga? This is my data { "user": [{ "id": 1, "name": "Thomas", "comment_id": [1, 2, 3] }, { "id": 2, "name": "Riza", "comment_id": [4, 5, 6] } ], …
Riza S
  • 85
  • 1
  • 1
  • 7
1
vote
2 answers

Atomic update Mutation using Prisma

What would be the best way to atomically update a node using its an existing value (get-and-update)? Seems like the update node Mutation does not have an option of receiving an update-if-exists function. Locking the object with a write lock, getting…
Barak Yaari
  • 418
  • 7
  • 17
1
vote
1 answer

graphql-yoga - where are GraphQL resolver arguments defined and documented?

I've seen several sources describe the (root, args, context, info) arguments to a graphql-yoga resolver, but I am still searching for the real documentation of a graphql-yoga resolver. There are a few blog posts that mention the resolver…
Myer
  • 3,670
  • 2
  • 39
  • 51
1
vote
1 answer

Prisma GraphQL-Yoga: do the resolvers need to be asynchronous?

I'm trying to wrap my head around Prisma and GraphQL, using GraphQL-Yoga. One thing that has me puzzled in the resolvers. In the Prisma examples (https://github.com/prisma/prisma-examples/blob/master/node/graphql/src/index.js) the DB calls seem to…
Cerulean
  • 5,543
  • 9
  • 59
  • 111
1
vote
0 answers

GraphQL use an object type from a file in another file

Guys I want to do something like that, but I cant find the answer. I want to be able to use an object type defined in one file, inside another file. **post.schema.ts** type Post{ name:String! } **user.schema.ts** type…
Georgian Stan
  • 1,865
  • 3
  • 13
  • 27
1 2 3
99
100