-
Notifications
You must be signed in to change notification settings - Fork 350
Open
Description
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
- 1. The issue provides a reproduction available on
Github,
Stackblitz
or
CodeSandbox
Make sure to fork this template and run
yarn generate
in the terminal.Please make sure Mesh package versions under
package.json
matches yours.
- 2. A failing test has been provided
- 3. A local solution has been provided
- 4. A pull request is pending review
Describe the bug
To Reproduce Steps to reproduce the behavior:
- Open https://codesandbox.io/p/sandbox/clever-williams-j8m76t
- Check .meshrc.yml (cacheKey contains sessionId which is based on the value of the header
test
) - Enter the following Query into Yoga GraphiQL:
{
greeting
}
- Enter the following header into Yoga GraphiQl:
{
"test": "a"
}
- Run query (responseCache extension says
didCache: true
) - Run query again (responseCache extension says
hit: true
) - Change test header value to "b"
- Run query again (responseCache extension says
hit: true
)
Expected behavior
- With a different header value, the last query should not be a cache hit
Environment:
- OS: MacOS
@graphql-mesh/response-cache
: 0.2.7- NodeJS: 16.x
Additional context
There was a related PR (#4109), the problem is that in the session function in packages/plugins/response-cache/src/index.ts
we are still getting a fetch Headers object which is not supported in string interpolation.
Metadata
Metadata
Assignees
Labels
No labels