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

Cannot use headers in sessionId or cacheKey #5102

Open
3 of 4 tasks
mayrn-techdivision opened this issue Feb 2, 2023 · 0 comments · May be fixed by #5103
Open
3 of 4 tasks

Cannot use headers in sessionId or cacheKey #5102

mayrn-techdivision opened this issue Feb 2, 2023 · 0 comments · May be fixed by #5103

Comments

@mayrn-techdivision
Copy link

mayrn-techdivision commented Feb 2, 2023

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

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:

{
  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.

@mayrn-techdivision mayrn-techdivision linked a pull request Feb 2, 2023 that will close this issue
9 tasks
This was referenced Apr 30, 2024
This was referenced May 7, 2024
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 a pull request may close this issue.

1 participant