fix: expose QueryOptions and MutationOptions type#1414
Merged
HendrikThePendric merged 3 commits intomasterfrom Jun 5, 2025
Merged
fix: expose QueryOptions and MutationOptions type#1414HendrikThePendric merged 3 commits intomasterfrom
HendrikThePendric merged 3 commits intomasterfrom
Conversation
…r .query and .mutate
|
kabaros
approved these changes
Jun 5, 2025
dhis2-bot
added a commit
that referenced
this pull request
Jun 5, 2025
## [3.14.4](v3.14.3...v3.14.4) (2025-06-05) ### Bug Fixes * expose Query, Mutation and ExecuteOptions types ([#1414](#1414)) ([a1d2315](a1d2315))
Contributor
|
🎉 This PR is included in version 3.14.4 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR exposes the
QueryandMutationtype asQueryOptionsandMutationOptions. Use case for this is that I am trying to hook theDataEngineup with the RTK Query / Redux Toolkit. I am adding an instance of theDataEngineusingcreateDynamicMiddleWare. This allows me to then access the the data engine in mycustomBaseQuery. However, I need to accurately type the arguments which may be passed to this base query and these arguments should match whatever I can pass toengine.queryorengine.mutate. Hence this PR.In my second commit 49b7155 I export
QueryExecuteOptionsasExecuteOptions. I'm a bit unsure about this because it makes the name more generic, which probably isn't a good thing... The thinking behind it is as follows:engine.queryandengine.mutatetake two positional arguments and the second one for each is of typeQueryExecuteOptionsQueryfor the second positional argument which is also used byengine.mutateis a bit confusing