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

feat: expose findAllByQuery method in modules and services #1044

Merged

Conversation

jimezesinachi
Copy link
Contributor

…ecessary tests for the switch

Signed-off-by: Jim Ezesinachi [email protected]

…ecessary tests for the switch

Signed-off-by: Jim Ezesinachi <[email protected]>
@jimezesinachi jimezesinachi requested a review from a team as a code owner October 5, 2022 13:26
Copy link
Contributor

@genaris genaris left a comment

Choose a reason for hiding this comment

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

Thanks @rapaktech ! I think this will be very useful. I left some comments in the code but I would like to add some general suggestions that maybe others can comment on as well:

  • I would prefer to use the naming 'findAllByQuery' to emphasize that multiple records could be retrieved. This is the same naming as used in other modules such as basic-messages and generic-records
  • As I think this is related to Expose findByQuery methods in public API of all modules #1022, it would be nice to expose these methods in the corresponding module classes. If I'm not wrong, you can even modify the parameters of findAllByQuery of BasicMessagesModule and GenericRecordsModule without introducing a breaking change, since Query<T extends BaseRecord> contains Partial<RecordTags<T extends BaseRecord>>

jimezesinachi and others added 2 commits October 5, 2022 16:58
@jimezesinachi
Copy link
Contributor Author

I'm sill working on the changes.. I'll re-request a review when I'm done

@jimezesinachi jimezesinachi changed the title exposed findByQuery method in module services and added some of the n… feat: exposed findByQuery method in module services and added some of the necessary tests for the switch Oct 5, 2022
@codecov-commenter
Copy link

codecov-commenter commented Oct 6, 2022

Codecov Report

Merging #1044 (091dd57) into main (0d14a71) will decrease coverage by 0.15%.
The diff coverage is 30.00%.

@@            Coverage Diff             @@
##             main    #1044      +/-   ##
==========================================
- Coverage   88.74%   88.58%   -0.16%     
==========================================
  Files         522      522              
  Lines       12156    12180      +24     
  Branches     1913     1913              
==========================================
+ Hits        10788    10790       +2     
- Misses       1364     1386      +22     
  Partials        4        4              
Impacted Files Coverage Δ
.../modules/action-menu/services/ActionMenuService.ts 96.68% <0.00%> (-1.30%) ⬇️
.../src/modules/basic-messages/BasicMessagesModule.ts 93.33% <0.00%> (ø)
...les/basic-messages/services/BasicMessageService.ts 92.59% <0.00%> (ø)
.../core/src/modules/connections/ConnectionsModule.ts 70.06% <0.00%> (-0.97%) ⬇️
.../core/src/modules/credentials/CredentialsModule.ts 87.85% <0.00%> (-0.83%) ⬇️
packages/core/src/modules/oob/OutOfBandModule.ts 84.58% <0.00%> (-0.59%) ⬇️
packages/core/src/modules/proofs/ProofsModule.ts 78.12% <0.00%> (-0.99%) ⬇️
...s/core/src/modules/proofs/services/ProofService.ts 85.67% <0.00%> (-0.50%) ⬇️
...rc/modules/question-answer/QuestionAnswerModule.ts 91.48% <0.00%> (-4.07%) ⬇️
.../question-answer/services/QuestionAnswerService.ts 92.10% <0.00%> (ø)
... and 10 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@genaris genaris linked an issue Oct 6, 2022 that may be closed by this pull request
Copy link
Contributor

@genaris genaris left a comment

Choose a reason for hiding this comment

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

Looks pretty good and I actually approved it but noticed some remaining issues afterwards.

packages/core/src/storage/StorageService.ts Show resolved Hide resolved
samples/extension-module/dummy/DummyApi.ts Outdated Show resolved Hide resolved
samples/extension-module/dummy/services/DummyService.ts Outdated Show resolved Hide resolved
@genaris genaris changed the title feat: exposed findByQuery method in module services and added some of the necessary tests for the switch feat: expose findAllByQuery method in modules and services Oct 6, 2022
jimezesinachi and others added 5 commits October 6, 2022 20:24
…uery import in DummyApi and DummyService with the new Query export

Signed-off-by: Jim Ezesinachi <[email protected]>
…uery import in DummyApi and DummyService with the new Query export

Signed-off-by: Jim Ezesinachi <[email protected]>
@genaris genaris enabled auto-merge (squash) October 6, 2022 23:57
@genaris genaris disabled auto-merge October 6, 2022 23:57
@genaris genaris enabled auto-merge (squash) October 6, 2022 23:58
@genaris genaris merged commit 9dd95e8 into openwallet-foundation:main Oct 6, 2022
TimoGlastra added a commit that referenced this pull request Oct 11, 2022
* feat: OOB public did (#930)

Signed-off-by: Pavel Zarecky <[email protected]>

* feat(routing): manual mediator pickup lifecycle management (#989)

Signed-off-by: Ariel Gentile <[email protected]>

* docs(demo): faber creates invitation (#995)

Signed-off-by: conanoc <[email protected]>

* chore(release): v0.2.3 (#999)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(question-answer): question answer protocol state/role check (#1001)

Signed-off-by: Ariel Gentile <[email protected]>

* feat: Action Menu protocol (Aries RFC 0509) implementation (#974)

Signed-off-by: Ariel Gentile <[email protected]>

* fix(ledger): remove poolConnected on pool close (#1011)

Signed-off-by: Niall Shaw <[email protected]>

* fix(ledger): check taa version instad of aml version (#1013)

Signed-off-by: Jakub Koci <[email protected]>

* chore: add @janrtvld to maintainers (#1016)

Signed-off-by: Timo Glastra <[email protected]>

* feat(routing): add settings to control back off strategy on mediator reconnection (#1017)

Signed-off-by: Sergi Garreta <[email protected]>

* fix: avoid crash when an unexpected message arrives (#1019)

Signed-off-by: Pavel Zarecky <[email protected]>

* chore(release): v0.2.4 (#1024)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* style: fix some lint errors

Signed-off-by: Ariel Gentile <[email protected]>

* feat: use did:key flag (#1029)

Signed-off-by: Ariel Gentile <[email protected]>

* ci: set default rust version (#1036)

Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>

* fix(oob): allow encoding in content type header (#1037)

Signed-off-by: Timo Glastra <[email protected]>

* feat: connection type (#994)

Signed-off-by: KolbyRKunz <[email protected]>

* chore(module-tenants): match package versions

Signed-off-by: Ariel Gentile <[email protected]>

* feat: improve sending error handling (#1045)

Signed-off-by: Ariel Gentile <[email protected]>

* feat: expose findAllByQuery method in modules and services (#1044)

Signed-off-by: Jim Ezesinachi <[email protected]>

* feat: possibility to set masterSecretId inside of WalletConfig (#1043)

Signed-off-by: Andrii Uhryn <[email protected]>

* fix(oob): set connection alias when creating invitation (#1047)

Signed-off-by: Jakub Koci <[email protected]>

* build: fix missing parameter

Signed-off-by: Ariel Gentile <[email protected]>

Signed-off-by: Pavel Zarecky <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: conanoc <[email protected]>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Niall Shaw <[email protected]>
Signed-off-by: Jakub Koci <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Sergi Garreta <[email protected]>
Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: Jim Ezesinachi <[email protected]>
Signed-off-by: Andrii Uhryn <[email protected]>
Co-authored-by: Iskander508 <[email protected]>
Co-authored-by: conanoc <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Niall Shaw <[email protected]>
Co-authored-by: jakubkoci <[email protected]>
Co-authored-by: Timo Glastra <[email protected]>
Co-authored-by: Sergi Garreta Serra <[email protected]>
Co-authored-by: Sai Ranjit Tummalapalli <[email protected]>
Co-authored-by: KolbyRKunz <[email protected]>
Co-authored-by: Jim Ezesinachi <[email protected]>
Co-authored-by: an-uhryn <[email protected]>
genaris added a commit to 2060-io/aries-framework-javascript that referenced this pull request Oct 13, 2022
* feat: OOB public did (openwallet-foundation#930)

Signed-off-by: Pavel Zarecky <[email protected]>

* feat(routing): manual mediator pickup lifecycle management (openwallet-foundation#989)

Signed-off-by: Ariel Gentile <[email protected]>

* docs(demo): faber creates invitation (openwallet-foundation#995)

Signed-off-by: conanoc <[email protected]>

* chore(release): v0.2.3 (openwallet-foundation#999)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(question-answer): question answer protocol state/role check (openwallet-foundation#1001)

Signed-off-by: Ariel Gentile <[email protected]>

* feat: Action Menu protocol (Aries RFC 0509) implementation (openwallet-foundation#974)

Signed-off-by: Ariel Gentile <[email protected]>

* fix(ledger): remove poolConnected on pool close (openwallet-foundation#1011)

Signed-off-by: Niall Shaw <[email protected]>

* fix(ledger): check taa version instad of aml version (openwallet-foundation#1013)

Signed-off-by: Jakub Koci <[email protected]>

* chore: add @janrtvld to maintainers (openwallet-foundation#1016)

Signed-off-by: Timo Glastra <[email protected]>

* feat(routing): add settings to control back off strategy on mediator reconnection (openwallet-foundation#1017)

Signed-off-by: Sergi Garreta <[email protected]>

* fix: avoid crash when an unexpected message arrives (openwallet-foundation#1019)

Signed-off-by: Pavel Zarecky <[email protected]>

* chore(release): v0.2.4 (openwallet-foundation#1024)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* style: fix some lint errors

Signed-off-by: Ariel Gentile <[email protected]>

* feat: use did:key flag (openwallet-foundation#1029)

Signed-off-by: Ariel Gentile <[email protected]>

* ci: set default rust version (openwallet-foundation#1036)

Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>

* fix(oob): allow encoding in content type header (openwallet-foundation#1037)

Signed-off-by: Timo Glastra <[email protected]>

* feat: connection type (openwallet-foundation#994)

Signed-off-by: KolbyRKunz <[email protected]>

* chore(module-tenants): match package versions

Signed-off-by: Ariel Gentile <[email protected]>

* feat: improve sending error handling (openwallet-foundation#1045)

Signed-off-by: Ariel Gentile <[email protected]>

* feat: expose findAllByQuery method in modules and services (openwallet-foundation#1044)

Signed-off-by: Jim Ezesinachi <[email protected]>

* feat: possibility to set masterSecretId inside of WalletConfig (openwallet-foundation#1043)

Signed-off-by: Andrii Uhryn <[email protected]>

* fix(oob): set connection alias when creating invitation (openwallet-foundation#1047)

Signed-off-by: Jakub Koci <[email protected]>

* build: fix missing parameter

Signed-off-by: Ariel Gentile <[email protected]>

Signed-off-by: Pavel Zarecky <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: conanoc <[email protected]>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Niall Shaw <[email protected]>
Signed-off-by: Jakub Koci <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Sergi Garreta <[email protected]>
Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: Jim Ezesinachi <[email protected]>
Signed-off-by: Andrii Uhryn <[email protected]>
Co-authored-by: Iskander508 <[email protected]>
Co-authored-by: conanoc <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Niall Shaw <[email protected]>
Co-authored-by: jakubkoci <[email protected]>
Co-authored-by: Timo Glastra <[email protected]>
Co-authored-by: Sergi Garreta Serra <[email protected]>
Co-authored-by: Sai Ranjit Tummalapalli <[email protected]>
Co-authored-by: KolbyRKunz <[email protected]>
Co-authored-by: Jim Ezesinachi <[email protected]>
Co-authored-by: an-uhryn <[email protected]>
@jimezesinachi jimezesinachi deleted the feat/expose-query-methods branch November 16, 2022 10:45
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.

Expose findByQuery methods in public API of all modules
4 participants