firebase-tools
firebase-tools copied to clipboard
[Data Connect] Cannot reset nullable column to `null` via GraphQL `tablename_update`
[REQUIRED] Environment info
firebase-tools: 14.2.0
Platform: macOS
[REQUIRED] Test case
dataconnect/schema/schema.gql
type User @table(key: "id") {
id: String! @default(expr: "auth.uid")
createdAt: Timestamp! @col(name: "created_at")
deletedAt: Timestamp @col(name: "deleted_at") # nullable
}
[REQUIRED] Steps to reproduce
- update
deletedAtof a user with non-null value
mutation SetDeletedAt($userId: String!) {
user_update(
id: $userId
data: { deletedAt_expr: "request.time" }
)
}
- update
deletedAtof the user withnull
mutation SetDeletedAtToNull($userId: String!) {
user_update(
id: $userId
data: { deletedAt: null }
)
}
We also tried:
- replace
deletedAtwithdeletedAt_exprin the mutation - replade
nullwithNULL,"null", and"NULL"
[REQUIRED] Expected behavior
deletedAt of the specified user is set to null
[REQUIRED] Actual behavior
Mutation succeeds, but deletedAt of the user remains unchanged.
Same issue here. unable to update a value to null.
Thanks for the report! I will try to repro and have a fix ready soon
I have a fix. Should come out in next release.
Closing this since the fix is in on the emulator side. This will go out in this week's release.