Open bryancuster opened 8 months ago
Just to check — this is prevented by using TypeScript, right?
I'm not sure that "every single API needs to have runtime checks on every single argument to prevent misuse which could already be caught at compile time by the use of TypeScript (even just for typechecking on JS files, which it supports)" is the best use of resources.
I believe this is the line of code in question, where if no valid config is given to exclude and it is also not undefined
then it just sends the raw value.
Just to check — this is prevented by using TypeScript, right?
That seems correct given the CodeSandbox. Our team uses just JS so didn't notice any issues.
Issue Description
When configuring
ApolloServerPluginUsageReporting
, if you misconfiguresendVariableValues
it seems to result in the same behavior as{all: true}
.Intended outcome
I think I would expect either an error due to the misconfiguration or a better logical fallback inline with
{none: true}
.Actual outcome
We mistakenly set
sendVariableValues
to a function instead oftransform
and then saw all variables sent to apollo studio.I can fork and add this to git if you'd like
Link to Reproduction
https://codesandbox.io/p/devbox/stupefied-faraday-4vfmt4
Reproduction Steps
No response