Summary

Sample project to demonstrate the following Bug:

  • When a field is once in a fragment with @include(if:false) and once outside of that fragment, the field is not returned by the HotChocolate API.

Steps to reproduce

  • Run the Demo Api from this repository
  • Perform the following Query
{
  alphaWithFragment: alpha {
    __typename
    ...f @include(if: true)
  }

  alphaWithoutFragment: alpha {
    __typename
    ...f @include(if: false)
  }
}

fragment f on Abc {
  foo
  __typename
}

Expected result

In the JSON Result, alphaWithoutFragment should contain a field "__typename".

Actual result

it doesn't