-
Notifications
You must be signed in to change notification settings - Fork 223
Open
Labels
Description
Hey,
I'm currently writing some docs on field deprecation (because I always forgot how to do it 🤣 ) and I just encountered a weird behavior.
When we mark a field a field as deprecated and we still use it in queries, it would be nice to see a warning, no?
Human:
type: object
config:
description:
fields:
faith:
deprecationReason: "We've lost faith in Humanity"
Query:
type: object
config:
fields:
humans: { type: "[Human]!" }
running query { humans { faith } }
should returns something like that:
{
"data": {
"humans": [...]
},
"extension": {
"deprecationWarnings": [
{
"message": "The field is marked as deprecated",
"field": "humans.faith",
"reason": "We've lost faith in Humanity"
}
]
}
}
What do you think?