Set include_deprecated default value to true for backwards compatibility #1333
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Absinthe introspection has always included deprecated fields, but there were a few misleading tests.
For example, this test was targeting the ProfileInput object, which had no deprecated fields until #1291 added one.
The test mentioned above continued working successfully because the include_deprecated argument default was set to false.
Purpose
Since Absinthe has always included deprecated fields for args, input_fields, and field, I recommend setting the default value of include_deprecated to true for these categories to maintain backwards compatibility (changed by #1291).
Considerations
enum_values
and__type
already had include_deprecated default set to false before adding include_deprecated to other fields. I understand the inconsistency this PR introduces, with some defaults set to true and others to false. However, the trade-off seems worth it to maintain backwards compatibility. If we decide to set include_deprecated to false by default, we could highlight this breaking change more explicitly in the CHANGELOG.Fixes #1327