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
8
votes
3 answers

Implementing search functionality in Prisma/GraphQL

I want to implement a simple searching functionality with Prisma I have seen some info about using the where clause but it’s case sensitive so it’s not a good solution. I’ve also seen some tutorials using external services. I don’t want to use any…
JV Lobo
  • 5,526
  • 8
  • 34
  • 55
7
votes
3 answers

How to solve Apollo Studio Sanbox Cors?

I can't use apollo Studio. After migration for Graphql playground. When I try to run in localhost and redirect me to apollo studio sanbox https://studio.apollographql.com/sandbox?endpoint=http%3A%2F%2Flocalhost%3A5018%2Fgraphql: Unable to connect to…
lohnsonok
  • 471
  • 6
  • 12
7
votes
2 answers

Prisma: Query across multiple schemas in a database

Does prisma support the ability to fetch data from multiple schemas from within a single database?
Muhammad Rehan Qadri
  • 6,824
  • 1
  • 17
  • 18
7
votes
1 answer

Prisma Not Returning Created Related Records

i want to create a new graphql api and i have an issue that i am struggling to fix. the code is open source and can be found at: https://github.com/glitr-io/glitr-api i want to create a mutation to create a record with relations... it seems the…
X0r0N
  • 1,816
  • 6
  • 29
  • 50
7
votes
1 answer

Nexus-prisma: order nested connections

What is the best way to keep order of nested objects in the schema. My schema: type Article { id: ID! @id pages: [Page!]! } type Page { id: ID! @id } This is how I'm trying to sort the pages(unsuccessfully): updateArticle({ variables:…
Tomas Randus
  • 2,127
  • 4
  • 29
  • 38
7
votes
2 answers

With Prisma, How can we add a comment for a Type?

With prisma.io (graphQl), we have: File: datamodel.graphql """I am a great User""" type User { id: ID! @unique email: String! @unique } after doing prisma deploy, it generates a file without the comment from the file datamodel.graphql File…
Alan
  • 9,167
  • 4
  • 52
  • 70
7
votes
3 answers

Prisma: What's the workflow?

Just started using Prisma as a way to integrate GraphQL and MySQL into a new project I am working on. It's great, I love how simply it lays things out. I have a few questions which are bothering me though regarding the workflow to follow when…
A.Smith
  • 427
  • 5
  • 14
6
votes
6 answers

Prisma with psql db - incompatible types: text and uuid

I am trying to learn how to use prisma with a psql database. I'm running into an issue using references where the id is a uuid string. I have a user model with: model User { id String @id @default(dbgenerated("gen_random_uuid()"))…
Mel
  • 2,481
  • 26
  • 113
  • 273
6
votes
1 answer

Prisma generates database tables with uppercase in mysql. Is there any way to generate tables only in lowercase?

Prisma generates database tables with uppercase in MySQL. Is there any way to generate tables only in lower case?
Vasanthkumar
  • 71
  • 1
  • 4
6
votes
1 answer

Optional argument - Mutation - TypeGraphQL

I want to update the firstName and lastName of a profile entity. I would like the user to be able to update both of them or just one of them. However I do not know how to make the mutation such that one of the argument (firstName and lastName) is…
Magofoco
  • 5,098
  • 6
  • 35
  • 77
6
votes
2 answers

prisma2 set length and column type in prisma schema

how can i set string(varchar) length for string type be 50 and define a column be TEXT in prisma schema, for user table i want name be varchar(50) and bio be Text column. im creating my tables by prisma migrate save and up. model User { id …
devmrh
  • 1,171
  • 4
  • 19
  • 46
6
votes
1 answer

How to set timeout to graphql-client

I'm trying to set timeout with prisma-labs/graphql-request. I've tried the way described here - https://github.com/prisma-labs/graphql-request/issues/103. const client = new GraphQLClient(config.url, { timeout: 30000, headers: { …
unknown_boundaries
  • 1,482
  • 3
  • 25
  • 47
6
votes
1 answer

Error: Valid values for the strategy argument of `@scalarList` are: RELATION

Program pops up this -> (Valid values for the strategy argument of @scalarList are: RELATION.) after run prisma deploy. Any one knows why ? type User { id: ID! @id …
Bruce
  • 457
  • 1
  • 5
  • 18
6
votes
2 answers

Use existing variables when using refetchQueries in react-apollo

I am using postsConnection query for infinite scroll. It contains variables like after. After doing an upvote mutation, I want to refetchQueries... like this const upvote = await client.mutate({ mutation: UPVOTE_MUTATION, variables: { …
6
votes
1 answer

Auto generated Incrementing field for prisma

I have created an entity called Order in my datamodel.prisma file. there it should have it's automatically generating field called orderRef. which should have an automatically generated incremental value for createOrder field of the Order entity for…
Dulara Malindu
  • 1,477
  • 4
  • 18
  • 37
1
2
3
27 28