-
Notifications
You must be signed in to change notification settings - Fork 786
getQueryRecycler is not a function #989
Comments
I'm getting this error, too. I think there's some kind of "conflicting" with some other packages. In one of my project downgrade react-apollo to ^1.0.1 solves the problem. While in one other project it doesn't. |
the codeship builds of our project are also failing because of this error. here is the relevant part of package.json:
|
At the moment having the same error as well since like monday... the weird thing is that it happened once uploaded to a staging and pre production env but on local env I dont see or have this error...only on once uploaded it....It's been a real brain headache for 2 days now not knowing where or what is going wrong... Tried downgrading as well the versions of packages in package.json aswell on how it was before in the previous upload when everything still worked...but it seems not to be related to a package.... If anyone finds an answer that would be awesome :D I will also keep going on to see where or what I did to get this error and post my solution. PS: Error also seems to be only client side indeed |
It seem to be something wrong with latest version. I were getting this error because in my package.json was this string "react-apollo": "^1.4.6". For deploying i am use "npm": "5.0.1". It did install latest version of react-apollo(1.4.14). |
@pvcrea @kuksik i had no problem with 1.4.11 so i reverted to that and it works now. another solution could be yarn or npm v5 (for example you can specify an npm version on heroku) because both of them have a lock file (it should be committed into the repository) and will use the exact versions of the packages. |
Removing the ^ infront indeed fixed it... i dont know why... ive removed the yarn.lock file on the env and put "react-apollo": "1.4.6" in package.json instead of the "react-apollo": "^1.4.6" and it works :O.... why.... i dont know :D |
@pvcrea I've run into this issue as well with cloud builds of my projects. I think it's because when it sees the NPM versioning is a bit confusing, I think it's best to maybe remove all the |
Indeed tested with ^1.4.6 and it installed 1.4.14 on the env and which gave me the error again... seems somewhere from 1.4.6 there is something wrong... 1.4.6 does work...haven't tried anything in between yet so dont know which version seems to be brake it, but 1.4.6 works. |
I entered this issue too. It's because I'm injecting |
I have the same error recently |
After a little testing, it appears that 1.4.12 is the last working version (1.4.13 looks like it had a dependency issue unrelated to this). |
I can confirm that |
@bazyli-brzoska what issues are you seeing with 1.4.14? |
Does anyone have a reproduction I can take a look at? |
Hi @jbaxleyiii. The same issue as described in the issue, As for reproduction, I just copied and pasted the example from the documentation and routed to my local GraphQL server (also from your example): example.jsimport React from 'react'
import gql from 'graphql-tag'
import {graphql, createNetworkInterface, ApolloProvider, ApolloClient} from 'react-apollo'
const networkInterface = createNetworkInterface({
uri: 'http://localhost:3000/graphql',
opts: {
credentials: 'include',
},
})
const client = new ApolloClient({
networkInterface,
})
// The data prop, which is provided by the wrapper below contains,
// a `loading` key while the query is in flight and posts when it is ready
function PostList({ data: { loading, posts } }) {
if (loading) {
return <div>Loading</div>;
} else {
return (
<ul>
{posts.map(post =>
<li key={post.id}>
{post.title} by {' '}
{post.author.firstName} {post.author.lastName} {' '}
({post.votes} votes)
</li>
)}
</ul>
);
}
}
// The `graphql` wrapper executes a GraphQL query and makes the results
// available on the `data` prop of the wrapped component (PostList here)
const PostListWithQuery = graphql(gql`
query allPosts {
posts {
id
title
votes
author {
id
firstName
lastName
}
}
}
`)(PostList)
export default () => (
<ApolloProvider client={client}>
<PostListWithQuery/>
</ApolloProvider>
) |
OK @jbaxleyiii, I understand the problem now. I initially didn't have The thing is, after downgrading to 1.4.12, I got a meaningful message, saying something like:
However, in the latest version, 1.4.14, there was no such message, just a crash on I've updated to 1.4.14 and the above cited code (with |
I just wanted to drop in and say that I ran into this specifically in the test environment, which made it a bit tricky to slot it inside an |
Linking:
|
I will cut a release today that makes queryRecycling optional so any manual context additions of the client / testing will still work 👍 I do recommend wrapping the root of your tree in ApolloProvider where possible though |
This is fixed on master and will be released today! |
Using the compose function I got this error:
I can not say exactly what happened.I detected this error when deploy my project on the heroku. I think this error can be relate npm. I am tried different versions of npm and packages but nothing help(
my code:
"react-apollo": "^1.4.6",
"apollo-client": "^1.4.2",
"graphql": "^0.9.3",
The text was updated successfully, but these errors were encountered: