Skip to content

Cannot update boolean column using graphql mutation #162

Closed

Description

@artalat

Describe the bug
When trying to update a boolean column via update mutation using the graphql API, server throws that following error:

{
  "data": null,
  "errors": [
    {
      "message": "column \"completed\" is of type boolean but expression is of type text"
    }
  ]
}

To Reproduce
Steps to reproduce the behavior:

Using a typical todo example

Mutation:

mutation UpdateTaskMutation(
  $id: UUID!
  $title: String
  $description: String
  $completed: Boolean
) {
  updatetasksCollection(
    set: { title: $title, description: $description, completed: $completed }
    filter: { id: { eq: $id } }
  ) {
    affectedCount
    records {
      id
      title
      description
      completed
    }
  }
}

Query Variables:

{
  "id": "9def5b70-f0b0-443c-bb23-0643e90a6d2c",
  "title": "some title",
  "description": "a description",
  "completed": true
}

Expected behavior
To successfully update data in the database.

Screenshots
N/A

Versions:
Cloud hosted version

Additional context
N/A

Activity

  1. added
    triage-required
    on Apr 23, 2022
  2. olirice commented on Apr 25, 2022

    @olirice
    Contributor

    this was resolved in release v0.2.1 in this PR

    if you send me your supabase project ref I'll update your instance so you don't have to wait for the next release to receive the fix

  3. added
    bug
    and removed
    triage-required
    on Apr 25, 2022
  4. artalat commented on Apr 25, 2022

    @artalat
    Author

    this was resolved in release v0.2.1 in this PR

    if you send me your supabase project ref I'll update your instance so you don't have to wait for the next release to receive the fix

    Thanks, here it is stzovznbknzbjaepwvpq

  5. olirice commented on Apr 25, 2022

    @olirice
    Contributor

    thanks, updated
    please let me know if you continue to see any issues with that query

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions