You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 9, 2022. It is now read-only.
It seems that upon running npx prisma-schema-transformer, my String[] fields are being written back simply as String, which causes GraphQL queries to fail subsequently.
model App {
app_id String @id @default(dbgenerated())
languages String[]
@@map("app")
}
becomes
model App {
app_id String @id @default(dbgenerated())
languages String
@@map("app")
}
Error Message:
Just for reference, the error I received was:
{
"errors": [
{
"message": "\nInvalid `prisma.app.findFirst()` invocation in\n/opt/app/prisma/generated/type-graphql/resolvers/crud/App/AppCrudResolver.ts:33:27\n\n\n Attempted to serialize scalar '[String(\"EN\")]' with incompatible type 'String'",
}
],
...
}
Workaround:
Running npx prisma introspect again helped me to write the types back as they were.
However, since they were re-added, I had to remove my knex migration tables manually.