Skip to content

Fusion doesn't automatically coerce single values into lists for variables #9749

Closed

Description

@moeb-trackman

Product

Hot Chocolate

Version

16.1.0-p.1.12

Link to minimal reproduction

https://github.com/moeb-trackman/HotChocolate-Fusion-Bug/

Steps to reproduce

Running this query

# Query
query myQuery($id: [Int!]!){
  ordersByIds(ids: $id){
    id
    name
  }
}

# Variable
{
  "id": 1 # NOT array
}

What is expected?

Must automatically coerce single values into lists for variables according to the spec (List Input Coercion rule)

if the value passed to a list type is not a list and not null, the result is a list of size one

What is actually happening?

But results in an error:

{
  "errors": [
    {
      "message": "The value is not a list value.",
      "extensions": {
        "variable": "id"
      }
    }
  ]
}

Relevant log output

Additional context

No response

Activity

  1. tobias-tengler commented on May 20, 2026

    @tobias-tengler
    Member

    Thanks for reporting this. I'll have a look :)

  2. tobias-tengler commented on May 20, 2026

    @tobias-tengler
    Member

    This should be fixed with the next patch version (16.0.7).

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

Metadata

Metadata

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions