99designs / gqlgen

go generate based graphql server library

Home Page:https://gqlgen.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

introspection includeDeprecated on INPUT_FIELDs

chriss-de opened this issue · comments

What happened?

Introspection request results in a GRAPHQL_VALIDATION_FAILED
I try to query __schema.types.inputFields with arguments includeDeprecated: true and fields isDeprecated and deprecationReason

I already looked at the code and tried to extend gqlgen/graphql/introspection/type.go for InputValue to be like the code for EnumValue but it goes south when I call generate.
Maybe someone can fix that - or at least hint me into the direction what I'm missing and I can try a PR.
But the TESTING.md seems to be old - so this is another challenge...

What did you expect?

Correct introspection result. Response with all values - just like with introspection for enum values

Minimal graphql.schema and models to reproduce

query IntrospectionQuery { __schema { types { inputFields(includeDeprecated: true) { isDeprecated deprecationReason } } } }

versions

  • v0.17.45
  • 1.22