Giter Club home page Giter Club logo

Comments (4)

ameerulislam avatar ameerulislam commented on June 6, 2024

I found the tables that was causing the problem but they seem to be simple tables which are similar to my other tables.

`model db_test3 {
id BigInt @default(autoincrement())
function_name String @db.VarChar
frequency Int?
function_priority Int?
customer_priority Int?

@@id([id, function_name])
}
`

`model devops_resource_priority_tags {
id BigInt @default(autoincrement())
key String @db.VarChar
value String @db.VarChar
count Int?
tag_priority Int?
dev_engineer_priority Int?
devops_engineer_priority Int?
dev_lead_priority Int?

@@id([id, key, value])
@@unique([key, value])
}`

from prisma-appsync.

maoosi avatar maoosi commented on June 6, 2024

Seems like the issue is due to Prisma-AppSync not being able to extract unique fields from the @@unique API attribute and therefore not being able to generate the associated GraphQL Schema properly.

I'll add the issue to the roadmap, so it can be resolved in the next release. In the meantime, I can suggest adding @unique API attribute on both id fields, such as:

model db_test3 {
    id      BigInt      @unique @default(autoincrement())
}

model devops_resource_priority_tags {
    id      BigInt      @unique @default(autoincrement())
}

It is not perfect, but at least you should be able to generate your GraphQL Schema without errors.

from prisma-appsync.

ameerulislam avatar ameerulislam commented on June 6, 2024

@unique worked. thanks

from prisma-appsync.

ameerulislam avatar ameerulislam commented on June 6, 2024

and when I remove and make it 1 primary key and just keep the id as primary key and the other 2 as unique. That also works.

from prisma-appsync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.