Skip to content

Conversation

@jwaldrip
Copy link
Contributor

@jwaldrip jwaldrip commented Sep 5, 2025

Summary

Removes automatic field description inheritance based on community feedback from PR #1373.

Background

In PR #1373, I proposed automatic field description inheritance where fields would inherit descriptions from their referenced types when no explicit description was provided. The community provided clear feedback that this behavior was not desirable.

Community Feedback

  • @lloyd-pinrun questioned whether inheriting type descriptions for fields is desirable and suggested an alternative :inherit option
  • @cschiewek agreed that the proposed behavior seemed "counter intuitive and even downright misleading"
  • @benwilson512 also did not support the proposed change

This PR

Based on this feedback, this PR removes the automatic field description inheritance feature entirely, returning to the standard behavior where fields must have explicit descriptions.

Changes

  • Reverts the automatic inheritance behavior in introspection
  • Removes the associated test file
  • Returns to standard field description handling

Test Plan

  • Removed field description inheritance test
  • Verified introspection works normally without inheritance
  • All existing tests pass

Thank you for the valuable feedback on the original proposal. The community's preference for explicit, context-specific field descriptions makes sense.

jwaldrip and others added 13 commits June 4, 2025 00:29
- Fix mix absinthe.schema.json to use schema's adapter for introspection
- Fix mix absinthe.schema.sdl to use schema's adapter for directive names
- Update SDL renderer to accept adapter parameter and use it for directive definitions
- Ensure directive names follow naming conventions (camelCase, etc.) in generated SDL

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
When a field has no description, it now inherits the description from its
referenced type during introspection. This provides better documentation
for GraphQL APIs by automatically propagating type descriptions to fields.

- Modified __field introspection resolver to fall back to type descriptions
- Handles wrapped types (non_null, list_of) correctly by unwrapping first
- Added comprehensive test coverage for various inheritance scenarios
- Updated field documentation to explain the new behavior

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Based on community feedback from PR absinthe-graphql#1373, automatic field description
inheritance was not well received. The community preferred explicit
field descriptions that are specific to each field's context rather
than automatically inheriting from the referenced type.

This commit:
- Reverts the automatic inheritance behavior in introspection
- Removes the associated test file
- Returns to the standard field description handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Run mix format to fix formatting issues detected by CI.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Contributor

@benwilson512 benwilson512 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@cschiewek cschiewek changed the title Remove automatic field description inheritance feat: Remove automatic field description inheritance Oct 28, 2025
* `:description` - Description of a field, useful for introspection.
* `:description` - Description of a field, useful for introspection. If no description
is provided, the field will inherit the description of its referenced type during
introspection (e.g., a field of type `:user` will inherit the User type's description).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems wrong no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right — the docstring is describing the old inheritance behavior that this PR removes. I'll update the description to reflect that fields no longer inherit descriptions from their referenced types. Good catch, thanks!

jwaldrip and others added 2 commits February 6, 2026 11:29
The docstring was describing inheritance behavior that this branch
removes. Reverts to the original description text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants