You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Intended outcome:
Hello there! I was noticing a bug in my team's application when we recently made the change from using HTTPLink to BatchHTTPLink and some of our queries started to fail because of unused variables.
We've tried setting includeUnusedVariables in our BatchHTTPLink constructor but that had no effect. When looking through the batchHttpLink.ts code I noticed that the variable requestOptions didn't inherit includeUnusedVariables from fetchParams, which is eventually passed to linkConfig.options.
Actual outcome: BatchHTTPLink should strip unused variables by default just like HTTPLink and have the option of disabling it. See second bullet point here in the 3.3.0 change-log for details on behavior.
How to reproduce the issue:
With any Apollo Client implementation, swap out HTTPLink with BatchHTTPLink. Then, with any query/mutation, pass it extra variables and there should be an error thrown when unused variables are provided.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.
Intended outcome:
Hello there! I was noticing a bug in my team's application when we recently made the change from using
HTTPLink
toBatchHTTPLink
and some of our queries started to fail because of unused variables.We've tried setting
includeUnusedVariables
in ourBatchHTTPLink
constructor but that had no effect. When looking through thebatchHttpLink.ts
code I noticed that the variablerequestOptions
didn't inheritincludeUnusedVariables
fromfetchParams
, which is eventually passed tolinkConfig.options
.Actual outcome:
BatchHTTPLink
should strip unused variables by default just likeHTTPLink
and have the option of disabling it. See second bullet point here in the 3.3.0 change-log for details on behavior.How to reproduce the issue:
With any Apollo Client implementation, swap out
HTTPLink
withBatchHTTPLink
. Then, with any query/mutation, pass it extra variables and there should be an error thrown when unused variables are provided.Versions
System:
OS: macOS 11.5.2
Binaries:
Node: 16.6.2 - /usr/local/bin/node
Yarn: 1.22.5 - ~/.yarn/bin/yarn
npm: 7.20.3 - /usr/local/bin/npm
Browsers:
Chrome: 93.0.4577.82
Firefox: 92.0
Safari: 14.1.2
npmPackages:
@apollo/client: 3.3.19 => 3.4.13
apollo-link-sentry: 3.0.2 => 3.0.2
The text was updated successfully, but these errors were encountered: