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 has been 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.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Problem:
It seems that upon running
npx prisma-schema-transformer
, myString[]
fields are being written back simply asString
, which causes GraphQL queries to fail subsequently.becomes
Error Message:
Just for reference, the error I received was:
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.
The text was updated successfully, but these errors were encountered: