Skip to content
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

useLazyQuery brakes the whole app #9336

Closed
csotiMatyas opened this issue Jan 21, 2022 · 2 comments · May be fixed by #9382
Closed

useLazyQuery brakes the whole app #9336

csotiMatyas opened this issue Jan 21, 2022 · 2 comments · May be fixed by #9382
Assignees

Comments

@csotiMatyas
Copy link

csotiMatyas commented Jan 21, 2022

I'm an absolute novice playing around in apollo client.

const [searchItems, { data, loading, error }] = useLazyQuery( SEARCH_PRODUCT_QUERY, { fetchPolicy: "no-cache" } );

Simply declaring this in an empty component on a page makes every page load forever, no errors. Network activity is showing a single document with a name of "1", and its pending for ever.

Edit: with or without any fetchPolicy options.

///////

System:
OS: Windows 10 10.0.19042
Binaries:
Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.1.4 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (97.0.1072.62)
npmPackages:
@apollo/client: ^3.5.7 => 3.5.7
@apollo/link-error: ^2.0.0-beta.3 => 2.0.0-beta.3
@apollo/react-ssr: ^4.0.0 => 4.0.0
@apollo/react-testing: ^4.0.0 => 4.0.0
apollo-upload-client: ^17.0.0 => 17.0.0
next-with-apollo: ^5.1.1 => 5.2.1

@redeyes2015
Copy link

Hi, this seems to be the same issue as #9108. Would you mind checking the discussion there?

(I am not a maintainer)

@brainkim
Copy link
Contributor

brainkim commented Feb 2, 2022

Closing as a duplicate of #9108. Thanks for opening the issue and sorry for the trouble.

@brainkim brainkim closed this as completed Feb 2, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants