Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking(compiler): align extension getters to their type def counterparts #540

Merged
merged 1 commit into from
Apr 28, 2023

Conversation

lrlna
Copy link
Member

@lrlna lrlna commented Apr 28, 2023

While merging #428, I noticed some of our extension APIs weren't matching their type definition APIs. For example, UnionTypeDefinition has .members() API. UnionTypeExtension's version of this API is .union_members.

This PR fixes those inconsistencies.

Changed methods:

  • InputObjectTypeExtension.fields_definition() -> InputObjectTypeDefinition.fields()
  • ObjectTypeExtension.fields_definition() -> ObjectTypeExtension.fields()
  • InterfaceTypeExtension.fields_definition() -> InterfaceTypeExtension.fields()
  • EnumTypeExtension.enum_values_definition() -> EnumTypeExtension.values()
  • UnionTypeExtension.union_members() -> UnionTypeExtension.members()

@SimonSapin tagging you to double check here - i know you did the initial API improvements for .fields and .directives.

@lrlna lrlna added apollo-encoder apollo-compiler issues/PRs pertaining to semantic analysis & validation labels Apr 28, 2023
@lrlna lrlna requested a review from SimonSapin April 28, 2023 12:02
@lrlna lrlna self-assigned this Apr 28, 2023
Copy link
Member

@goto-bus-stop goto-bus-stop left a comment

Choose a reason for hiding this comment

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

looovely

@lrlna lrlna merged commit 0f2fdca into main Apr 28, 2023
@lrlna lrlna deleted the extension-api branch April 28, 2023 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apollo-compiler issues/PRs pertaining to semantic analysis & validation apollo-encoder
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants