nautilus / graphql

A package with convenience methods for building graphql tooling on the server
MIT License
28 stars 22 forks source link

The default graphql @deprecated directive is skipped #33

Open slavik-pastushenko opened 1 year ago

slavik-pastushenko commented 1 year ago

Hello!

It seems like there is an issue with the deprecated fields. I am specifying a list of URLs and using graphql.IntrospectRemoteSchemas(...) to get my schema. I realised that the behaviour of resolving deprecated fields is invalid.

My schema:

"Description"
property_a: [TypeA!] @deprecated(reason: "In favor of ...")

Expected result:

# Deprecated: In favor of ...
property_a: [TypeA!]

Actual result:

"Description"
property_a: [TypeA!]
JohnStarich commented 12 months ago

Hey @slavik-pastushenko! Thanks for opening.

Can you share how you produced the result? Is that via introspection, and if so which tool did you use? If you have the time, a Go test to reproduce would be very helpful in establishing a root cause and coming up with a fix.

It's worth noting some introspection tools may behave differently with respect to deprecation and descriptions. To my knowledge, gateway will keep directives as-is in the merged schema.