Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Support react-apollo >=3 ? #208

Open
elnygren opened this issue Aug 26, 2019 · 2 comments
Open

Support react-apollo >=3 ? #208

elnygren opened this issue Aug 26, 2019 · 2 comments

Comments

@elnygren
Copy link
Contributor

package.json says "react-apollo": "^2.5.8",

Is updating something else necessary for reeact-apollo 3 ?

https://github.com/apollographql/react-apollo/releases

@elnygren elnygren changed the title Support react-apollo >3 ? Support react-apollo >=3 ? Aug 27, 2019
@elnygren
Copy link
Contributor Author

It seems that at least my project is working with this:

"resolutions": {
    "react-apollo": "3.0.1"
}

I'm using Query, Mutation and ApolloConsumer in reasonml but the currently the amount of reasonml is limited so I can't say with certainty that everything definitely works.

@nlfiedler
Copy link

I tried moving from 2.5.8 to 3.0.1 in my project, using reason-apollo 0.17.0, and it failed immediately:

[Error] Invariant Violation: Could not find "client" in the context or passed in as a prop. Wrap the root component in an <ApolloProvider>, or pass an ApolloClient instance in via props.
[Error] The above error occurred in the <Query> component:
    in Query (created by ReasonApolloQuery$Make)
    in ReasonApolloQuery$Make (created by Home$Component)
    in Home$Component (created by Index$App)
    in main (created by Index$App)
    in div (created by Index$App)
    in Index$App
    in ApolloProvider

So there are some changes needed somewhere.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants