Skip to content

Demonstrates a bug in HotChocolate where a variable is included twice, causing the query to break

Notifications You must be signed in to change notification settings

maartenkools/hc-fusion-duplicate-vars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HotChocolate Fusion Bug

This repository demonstrates a bug in HotChocolate Fusion in which a variable name is included twice in the execution plan, causing an error

Usage

query getItems($groupId: String! = "groupId") {
  items(groupId: $groupId) {
    values(groupId: $groupId)
  }
}

The response is as following:

{
  "errors": [
    {
      "message": "Cannot return null for non-nullable field.",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "items"
      ],
      "extensions": {
        "code": "HC0018"
      }
    },
    {
      "message": "An item with the same key has already been added. Key: groupId",
      "extensions": {
        "code": "HC0012"
      }
    }
  ]
}

About

Demonstrates a bug in HotChocolate where a variable is included twice, causing the query to break

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages