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

refactor(config): represent field resolver as separate enum #2675

Merged
merged 5 commits into from
Aug 15, 2024

Conversation

meskill
Copy link
Contributor

@meskill meskill commented Aug 12, 2024

Summary:
Represent resolver for field as separate enum.

Pros of doing this:

  • resolver now could be reused for types without copy-pasting
  • single place to manage resolvers and avoid errors when adding new resolvers
  • fixes present minor issues for resolvers check across the codebase

Issue Reference(s):
Fixes #... (Replace "..." with the issue number)

Build & Testing:

  • I ran cargo test successfully.
  • I have run ./lint.sh --mode=fix to fix all linting issues raised by ./lint.sh --mode=check.

Checklist:

  • I have added relevant unit & integration tests.
  • I have updated the documentation accordingly.
  • I have performed a self-review of my code.
  • PR follows the naming convention of <type>(<optional scope>): <title>

@github-actions github-actions bot added the type: chore Routine tasks like conversions, reorganization, and maintenance work. label Aug 12, 2024
Copy link

codecov bot commented Aug 13, 2024

Codecov Report

Attention: Patch coverage is 93.63057% with 10 lines in your changes missing coverage. Please review.

Project coverage is 86.26%. Comparing base (bb9fc87) to head (7f6aa6c).
Report is 2 commits behind head on main.

Files Patch % Lines
src/core/config/config.rs 87.50% 8 Missing ⚠️
src/cli/tc/init.rs 0.00% 1 Missing ⚠️
tailcall-typedefs/src/main.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2675      +/-   ##
==========================================
- Coverage   86.32%   86.26%   -0.06%     
==========================================
  Files         255      255              
  Lines       24673    24670       -3     
==========================================
- Hits        21298    21282      -16     
- Misses       3375     3388      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@karatakis karatakis left a comment

Choose a reason for hiding this comment

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

Everything okay to me.

@tusharmath
Copy link
Contributor

tusharmath commented Aug 14, 2024

The generated schema shouldn't have changed ideally.
Screenshot 2024-08-14 at 6 37 22 PM

@tusharmath tusharmath marked this pull request as draft August 14, 2024 13:10
@meskill
Copy link
Contributor Author

meskill commented Aug 14, 2024

The generated schema shouldn't have changed ideally. Screenshot 2024-08-14 at 6 37 22 PM

This is a pure json schema issue. See GREsau/schemars#317. The actual parsing and graphql schema work as expected.

@tusharmath tusharmath enabled auto-merge (squash) August 15, 2024 13:54
@tusharmath tusharmath merged commit 4695489 into main Aug 15, 2024
35 of 36 checks passed
@tusharmath tusharmath deleted the refactor/field-resolver branch August 15, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: chore Routine tasks like conversions, reorganization, and maintenance work.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants