Closed bobjana closed 7 months ago
I'm facing this issue too, was able to reproduce by using the response-cache plugin and the encapsulate transform with a single source. If there are 2 or more sources the issue is no longer present:
Sorry for the late response! It doesn't happen on the single source because we don't apply stitching and forward requests directly to the single source's executor, and when cache hits, response cache plugin stops execution with result without applying the transforms after. So this causes you get the raw result. This would be solved after this PR gets merged; https://github.com/n1ru4l/envelop/pull/2093
@ardatan, I just upgraded all libraries to the latest releases and the bug still exists. My current dependencies are:
"dependencies": {
"@graphql-mesh/cache-redis": "^0.96.0",
"@graphql-mesh/cli": "^0.88.5",
"@graphql-mesh/graphql": "^0.96.0",
"@graphql-mesh/plugin-prometheus": "^0.96.0",
"@graphql-mesh/transform-encapsulate": "^0.96.0",
"@graphql-mesh/transform-federation": "^0.96.0",
"@graphql-mesh/transform-prefix": "^0.96.0",
"@graphql-mesh/transform-rename": "^0.96.0",
"graphql": "^16.8.1",
"prom-client": "^15.0.0"
}
Issue workflow progress
Progress of the issue based on the Contributor Workflow
Describe the bug The combinations of applying transformations and using Response cache plugin, causes mangled responses. Commenting out either transformations or caching gives the correct response. This used to work up to the following versions contained in (yarn.lock.txt)
To Reproduce Steps to reproduce the behavior: Unfortunately it's not possible to submit a reproducible sandbox as we're integrating with a 3rd party subgraph ContentStack which is not publicly accessible.
mesh-config.txt
Query:
Expected response:
Mangled Response:
Expected behaviour
Environment:
Additional context
While configuring snapshot plugin, noticed additional file being snapshoted while performing the same query: mangled_snapshots.zip as opposed to the snapshots when a valid response is returned: correct_snapshots.zip