-
Notifications
You must be signed in to change notification settings - Fork 74
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
setContext Is not a Function while using googleRecaptchaKey for global scope in graphcommerce.config.js #2015
Comments
I believe this a version mismatch between different @apollo/client versions. Can you try adding resolutions to your package.json?
Do you also encounter the problem on |
I closed accidentally |
Can you try with the latest release, everything should be fixed. |
BTW |
I believe it was a version mismatch between apollo/client versions. Closing the issue as it is recently fixed. |
Describe the Bug
Using googleRecaptchaKey for global scope in graphcommerce.config.js leads to using plugin:
GrecaptchaGraphQLProvider
, which causes the issue_.setContext is not a function
.The root of issue contains in
recaptchaLink
at 10 linerecaptchaLink
using inGrecaptchaGraphQLProvider
at line 40A few possibles way to fix this:
GoogleRecaptchaProvider
afterGraphQLProvider
in _app.tsxGrecaptchaGraphQLProvider
plugin and follow 1 step (to enable a GoogleRecaptcha)link
which has value [recaptchaLink] toGraphQLProvider
But it's lead an issue
=> Uncaught (in promise) ApolloErrorAdditional info
Expected Behavior
Any plugins should not reproduce unexpected bugs
To Reproduce
Add googleRecaptchaKey for global scope in graphcommerce.config.js
Add
GraphQLProvider
to _app.tsx (remove GoogleRecaptchaProvider if exist
)The text was updated successfully, but these errors were encountered: