Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

chore: Add GitBlobResolver and GitTreeResolver for readability#63223

Merged
varungandhi-src merged 1 commit into
mainfrom
vg/split-resolvers
Jun 12, 2024
Merged

chore: Add GitBlobResolver and GitTreeResolver for readability#63223
varungandhi-src merged 1 commit into
mainfrom
vg/split-resolvers

Conversation

@varungandhi-src

@varungandhi-src varungandhi-src commented Jun 12, 2024

Copy link
Copy Markdown
Contributor

In our backend, we mostly follow the convention that type names
for the resolvers match up with the types in the GraphQL API,
with the extra Resolver suffix. However, this is broken by the
GitTreeEntryResolver where there were no types called
GitBlobResolver or GitTreeResolver, since all functionality
was implemented on top of GitTreeEntryResolver.

Since Go supports implicit method forwarding for embedded structs,
I think we can improve the code consistency & readability by adding
these two stub resolver types.

As struct embedding is not a super common pattern, I've explicitly
mentioned that in the doc comments for GitBlobResolver and
GitTreeResolver.

Test plan

Should be covered by existing tests.

Changelog

@varungandhi-src varungandhi-src requested a review from eseliger June 12, 2024 04:39
@cla-bot cla-bot Bot added the cla-signed label Jun 12, 2024
@varungandhi-src varungandhi-src changed the title chore: Add GitBlobResolver and GitTreeEntryResolver for readability chore: Add GitBlobResolver and GitTreeResolver for readability Jun 12, 2024
@github-actions github-actions Bot added team/graph Graph Team (previously Code Intel/Language Tools/Language Platform) team/product-platform labels Jun 12, 2024
@varungandhi-src varungandhi-src enabled auto-merge (squash) June 12, 2024 06:28

@eseliger eseliger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks!

@varungandhi-src varungandhi-src merged commit 0316dbc into main Jun 12, 2024
@varungandhi-src varungandhi-src deleted the vg/split-resolvers branch June 12, 2024 12:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed team/graph Graph Team (previously Code Intel/Language Tools/Language Platform) team/product-platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants