graphene icon indicating copy to clipboard operation
graphene copied to clipboard

Implement deprecation directive for field args, directive args and input fields

Open flbraun opened this issue 3 years ago • 1 comments

The GraphQL spec finally allows using the @deprecated directive on field args, directive args and input fields (see graphql/graphql-spec#805)

It would be nice to support this in Graphene using the established deprecated_reason='....' kwarg to the respective constructors.

flbraun avatar Aug 18 '22 11:08 flbraun

Sounds like a great addition!

TODOS for this:

  • [ ] Is this already supported in graphql-core?
  • [ ] Add deprecation reason field to Meta Options Classes and [Input]Field logic
  • [ ] Check that required NonNull input fields are not deprecatable (see spec)

If someone is willing to work on a PR I'd be happy to assist and review!

erikwrede avatar Aug 19 '22 07:08 erikwrede

@erikwrede Hi Erik. Is this issue still relevant? I'd like to give it a try

vhutov avatar Nov 09 '22 23:11 vhutov

@vhutov Yes this is still relevant. Sounds great! Feel free to tag me when you need a review 🙂

erikwrede avatar Nov 10 '22 07:11 erikwrede

Will be released in 3.1.2, thanks to @vhutov! 🎉

erikwrede avatar Dec 10 '22 11:12 erikwrede