-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
Title
Prisma + Slack fails on linkAccount
How to reproduce ☕️
Use prisma and slack in a project.
When trying to log in you should get an error like so...
Unknown arg
okin data.ok for type AccountUncheckedCreateInput. Did you meanid? Available args:
type AccountUncheckedCreateInput {
id?: String
userId: String
type: String
provider: String
providerAccountId: String
refresh_token?: String | Null
access_token?: String | Null
expires_at?: Int | Null
token_type?: String | Null
scope?: String | Null
id_token?: String | Null
session_state?: String | Null
oauth_token_secret?: String | Null
oauth_token?: String | Null
}
Unknown argstatein data.state for type AccountUncheckedCreateInput. Did you meantype? Available args:
type AccountUncheckedCreateInput {
id?: String
userId: String
session_state?: String | Null
oauth_token_secret?: String | Null
oauth_token?: String | Null
}
The reason this happens isn't any thing crazy-- the object that comes back from slack has two additional properties or so it appears. "ok" and "state".
When linkAccount runs (which is a really basic method that doesn't remap any fields) it's got fields that prisma isn't expecting on the base schema.
linkAccount: (data) => p.account.create({ data }),
Your question/bug report 📓
See reproduction above.
Contributing 🙌🏽
No, I'm afraid I cannot help regarding this