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: Improve Omnichannel queries #29711

Merged
merged 6 commits into from
Aug 25, 2023
Merged

Conversation

KevLehman
Copy link
Contributor

@KevLehman KevLehman commented Jul 3, 2023

Proposed changes (including videos or screenshots)

  • Move queries to models
  • Correct fields for projection
  • Use correct projection for places where we aren't using the full obj

Issue(s)

Steps to test or reproduce

Further comments

@changeset-bot
Copy link

changeset-bot bot commented Jul 3, 2023

⚠️ No Changeset found

Latest commit: aa4b412

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Merging #29711 (aa4b412) into develop (fe6f5cd) will decrease coverage by 0.01%.
Report is 6 commits behind head on develop.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #29711      +/-   ##
===========================================
- Coverage    50.37%   50.37%   -0.01%     
===========================================
  Files          747      745       -2     
  Lines        14431    14400      -31     
  Branches      2581     2578       -3     
===========================================
- Hits          7270     7254      -16     
+ Misses        6773     6758      -15     
  Partials       388      388              
Flag Coverage Δ
e2e 47.81% <ø> (-0.01%) ⬇️
unit 67.75% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@KevLehman KevLehman marked this pull request as ready for review July 4, 2023 14:22
@KevLehman KevLehman requested review from a team as code owners July 4, 2023 14:22
@KevLehman KevLehman added this to the 6.4.0 milestone Jul 4, 2023
Copy link
Member

@sampaiodiego sampaiodiego left a comment

Choose a reason for hiding this comment

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

this is great! 👏 thx a lot! 🤗

just one overall comment, I think when using projection it is important to provide the correct returning type using generics.. otherwise TS will always return the full document, which can cause even more issues.

I know the generic is already there for findOneById<T>(...), so for places using it it would be just a matter of providing the returning type.. but for the new methods you'd need to add the generics too.

@KevLehman KevLehman requested a review from a team as a code owner July 12, 2023 14:53
murtaza98
murtaza98 previously approved these changes Jul 17, 2023
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: needs QA labels Aug 24, 2023
@ggazzo ggazzo merged commit bf1cd3d into develop Aug 25, 2023
41 checks passed
@ggazzo ggazzo deleted the refactor/queries-to-models-1 branch August 25, 2023 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants