You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I migrated the code to Apollo Client 3. At one point I've used useLazyQuery to fetch results. When a user selects an option from a dropdown field, the app fetches another data based on previous selection. It was working fine with previous version of Apollo Client.
Now, the browser becomes unresponsive right after I select an option from the dropdown.
Client configuration is simple.
Apollo 2:
import { ApolloClient } from "apollo-client";
import { createHttpLink } from "apollo-link-http";
import { InMemoryCache } from "apollo-cache-inmemory";
const httpLink = createHttpLink({
uri: `${process.env.REACT_APP_SERVER_URL}`,
});
const client = new ApolloClient({
link: httpLink,
cache: new InMemoryCache(),
});
export default client;
Apollo 3:
import { ApolloClient, InMemoryCache } from "@apollo/client";
const client = new ApolloClient({
uri: `${process.env.REACT_APP_SERVER_URL}`,
cache: new InMemoryCache(),
});
export default client;
We're not quite ready to publish @apollo/[email protected] yet, but I've published an @apollo/[email protected] release that includes #6588, which fixes some problems with onCompleted (and onError), if you want to try that in the meantime. 🙏
I migrated the code to Apollo Client 3. At one point I've used
useLazyQuery
to fetch results. When a user selects an option from a dropdown field, the app fetches another data based on previous selection. It was working fine with previous version of Apollo Client.Now, the browser becomes unresponsive right after I select an option from the dropdown.
Client configuration is simple.
Apollo 2:
Apollo 3:
useLazyQuery implementation looks like this:
Anyone having issue like this after migrating?
The text was updated successfully, but these errors were encountered: