When using React Playground v1.7.20 (also tried 22-test) with react-redux v6+, the following error is given
Uncaught Invariant Violation: Could not find "store" in either the context or props of "Connect(PlaygroundWrapper)". Either wrap the root component in a
, or explicitly pass "store" as a prop to "Connect(PlaygroundWrapper)".
Playground is used as
import { Playground, store } from 'graphql-playground-react';
import React from 'react';
import { Provider } from 'react-redux';
import { graphQLUri, graphQLWsUri } from '../../GraphQL/endpoints';
export const GraphQLPlayground: React.FC = () => (
<Provider store={store}>
<Playground
endpoint={graphQLUri}
settings={{ 'request.credentials': 'same-origin' }}
subscriptionEndpoint={graphQLWsUri}
/>
</Provider>
);
Experiencing the same issue.
Currently works with [email protected], which resolves to version 5.1.2.
Most helpful comment
Experiencing the same issue.
Currently works with
[email protected], which resolves to version5.1.2.