Open Kendalor opened 1 month ago
Latest commit: 45271af22e7b8f0eab2b4f9fde7d60f1220a22ae
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.
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
@ardatan is anythign missing ? Should the changeset be created by me ?
@EmrysMyrddin Could you review?
Hi, I'm not entirely against this feature, but I'm afraid we are introducing it to workaround an actual bug. I'm not sure to entirely understand what is happening here. We should probably first investigate why the plugin behave like this.
@EmrysMyrddin how would you suggest to move forward ? From my expierience/debugging suggestion the plugin identifies every object with an "id" field (configurable) as a cachable entity from a subgraph. If Subgraph A returns a value containing a field with an "id", the plugin seems to remove this part of the resonse while stitching the response together from a non existing subgraph B. Therefore setting the field to null.
🚨 IMPORTANT: Please do not create a Pull Request without creating an issue first.
Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request.
Description
Add a new optionalList of schemaCoordinates to the useResponseCacheParamters, which is used to exclude fields on specific objects in the mapSchema step.
Fixes #2247
Type of change
Please delete options that are not relevant.
Screenshots/Sandbox (if appropriate/relevant):
N/A
How Has This Been Tested?
Testet fix first on our case and environment by maintaining a parallel instance of this plugin. Further added Unit tests to first reproduce the Issue and proof the fix works.
Test Environment:
@envelop/response-cache
: 6.2.0Checklist:
Further comments
N/A