Questions tagged [prisma-binding]
18 questions
5
votes
1 answer
Prisma get data based on computed field
I need to get data depends on computed field
For example
const resolvers = {
Query: {
users: (parent, args, ctx, info) => {
const fragment = `fragment EnsureFullName on User { firstName lastName }`
return ctx.db.query.users({},…

Ghyath Darwish
- 2,614
- 4
- 15
- 31
4
votes
1 answer
how to get the total matched record count in prisma-binding npm
I have been using prisma-binding npm, I don't know how to get the total matched count of the query in order to perform pagination.
I'm using below code to pull record which working fine. Now i want total number of records.
const users = await…

Thavaprakash Swaminathan
- 6,226
- 2
- 30
- 31
2
votes
0 answers
Setting up prisma graphql playground with graphql yoga
In earlier prisma versions, it exposed localhost:4466 as a endpoint where graphql-playground can be accessed.
Through this playground, we could directly right queries to manipulate data in database.
I am trying to setup prisma with graphql-yoga and…

confusedWarrior
- 938
- 2
- 14
- 30
2
votes
2 answers
prisma.exists method not working with mongodb Atlas
i am using prisma image 1.34
I have a small issue trying to implement the prisma.exists method with mongodb atlas.
type Business {
_id: ID! @id
name: String!
desc: String!
published: Boolean!
author: User! @relation(name: "BusinessUser",…

Youssef
- 165
- 2
- 17
2
votes
1 answer
prisma.yml could not be found
I am trying to generate schema for my prisma data model while at the same time using secrets to restrict prisma access. After running prisma delete and prisma deploy, I run the command graphql get-schema -p prisma and get the following error…

Jimmy
- 3,090
- 12
- 42
- 99
1
vote
0 answers
GLIBC_2.33 version in not find in Ubuntu 22.04
I recently work with Prisma for my frontend project. then I find the error.
List all commands which I run to solve the GLIBC_2.33 error but all not working for me. if you have any suggestions tell…

officialrajdeepsingh
- 422
- 9
- 20
1
vote
1 answer
Prisma : Models and Relationship 1-n
I have two tables User and Tasks and a user can have many tasks, however i want a query to return a particular task, fetching details for the task, with author and assigned to users from the user table, usually would be done using aliases. DB is…

ty7
- 13
- 3
1
vote
0 answers
Prisma binding Nested filtering
I'm working on a food order platform with Prisma, Prisma-binding and Apollo Server on the backend. A customer can choose a restaurant in his neighbourhood and add one or more dishes to his cart. It is possible that when a dish from restaurant x is…

Thore
- 1,918
- 2
- 25
- 50
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
Graphql query returning null for relational document, field missing from query but present in primsa admin
When I view a document in prisma admin I see a location field but when I run queries against this database, the values are always null in the front end and are not being returned by the resolver at all.
I have looked at Why does a GraphQL query…

alphanumeric0101
- 104
- 10
0
votes
1 answer
How to set DateTime field in prisma python client
I'm struggling to find a way to create a db entry in python Prisma client for a model with a DateTime field i.e.
model Device {
id Int @id @default(autoincrement())
name String
timestamp DateTime
}
In my python program…

diramazioni
- 174
- 9
0
votes
0 answers
Prisma connect product to users with quantity
I have a list of products, and a list of users and I want to be able to relate users to what products they have but also what quantity they have of each product.
I've setup my user schema like this:
model users {
id String …

alienbuild
- 246
- 2
- 15
0
votes
1 answer
Error: Unable to establish a connection to query-engine-node-api library
I'm facing an issue anyone here to help me with Prisma? I am trying to deploy my Backend API on Cpanel hosting it's created by Prisma MySQL for database design and expressJs.
But, I tried a lot's of ways and I have recharged but never got any…

Developer Sabbir
- 52
- 5
0
votes
1 answer
Unable to Create Multiple Connect Query in Prisma?
I am getting this error ForeignKeyConstraintViolation { constraint: Index(\"Device\") } whenever i try to run following query.
const _CreatedConnectedToMobile = await Context.Database.ConnectedToMobile.create({ 'data': {} }) <-- creates entry in db…

Sushant
- 1
- 3
0
votes
0 answers
Create Prisma 2 Mutation on many to many field using Nexus
Hello guys i'm using prisma 2 in my node js serve and below is how i defined the schema of my models
model Interest {
id Int @default(autoincrement()) @id
name String
profile Profile[] @relation(references: [id])
…

MoffatMore
- 67
- 1
- 8