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
0
votes
2 answers

Prisma binding unable to connect to prisma server. request to http://localhost:4466/ failed, reason: connect ECONNREFUSED 127.0.0.1:4466

I am running two separate docker services. One for my GraphQL server and the other one is a prisma service connecting to a local Postgres database. I am able to run prisma deploy and test it out directly in http://localhost:4466. But When I try to…
Dhanushu Uzumaki
  • 183
  • 1
  • 14
-1
votes
1 answer

Check if GraphQL query returned any row

I have following simple selection query in GraphQL which checks if in dataDictionary table any record exists with name field dataDict101. query dataDictionary($where : DataDictionaryWhereUniqueInput!){ dataDictionary(where: $where){ id …
Data_Geek
  • 11
  • 4
-1
votes
1 answer

run mutation to store new user's post return Error: Variable '$data' expected value of type

im using graphql-yoga and prisma i made user and post datamodel. a user can have many posts i did like below. now according the addPost mutation i want to add new post that is related to current user. but graphql server return the following…
devmrh
  • 1,171
  • 4
  • 19
  • 46
-1
votes
1 answer

Apollo Server with prisma 2

I am trying to create Apollo server + Lambda + primsa2 const server = new ApolloServer({ typeDefs resolvers, playground: { endpoint: "/dev/graphql" } }) But what I have from prisma2 schema is like generator client { …
Lee
  • 333
  • 3
  • 7
  • 19
-1
votes
1 answer

How you build GraphQL queries using (where:)

I everyone, I hope you are all safe, healthy, and happy in these scary times. I am working on an e-commerce website based on Next.js Prisma, Yoga, and GraphQL. I am having trouble building a query to see if a Type field is true on an item in my DB…
Tithos
  • 1,191
  • 4
  • 17
  • 40
-1
votes
1 answer

Why does prisma give an internal error while creating new record?

I am trying to create a new record, although in my response I receive the following error: { "data": null, "errors": [ { "message": "Whoops. Looks like an internal server error. Search your server logs for request ID:…
-1
votes
1 answer

Prisma ORM query relation User

I'm trying to make to query 1:1 relation in Prisma ORM But when querying it always returns null Here is my datamodel: enum Role { ADMIN MEMBER CONSTRIBUTOR } type User { id: ID! @id name: String! @unique email: String! @unique …
Loki
  • 1,064
  • 2
  • 26
  • 55
-1
votes
1 answer

Graphql schema for add friends

Hi I want to create schema for friends functionality. Where logged in user can send friend request to registered users. I have 2 table users and relation and can be able to get own friends. Its working in redux and react with node mysql. But I don’t…
-2
votes
1 answer

closest numeric value in database using Prisma Client

Is there any way I could re-write this SQL query using Prisma Client. SELECT TOP 1 * FROM [myTable] WHERE Name = 'Test' and Size = 2 and PType = 'p' ORDER BY ABS( Area - @input )
user3278869
  • 3
  • 1
  • 5
-2
votes
2 answers

Graphql Prisma with nodejs query question

I want to write SQL query to SELECT sm.menu_name FROM shop.menu as sm LEFT JOIN shop.shop_menu as ssm ON sm.idmenu = ssm.menu_id WHERE sm.menu_name LIKE CONCAT('%', ?, '%') Group by sm.menu_name Order by rand() How can I write…
Lee
  • 333
  • 3
  • 7
  • 19
-2
votes
2 answers

How do I add a column for uri link to external resource(cloudinary assets), to a graphQL - Apollo - Prisma Server for React Native App?

I am building a React Native Mock Craft Beer App. The datamodel.prisma is: Type Beer { id: ID! @id name: String! abv: Int! body: String! description: String! postedBy: User votes: [Vote!]! createdAt: DateTime! @createdAt …
1 2 3
27
28