Skip to content

useQuery not updating loading state #6253

Closed
@samrith-s

Description

@samrith-s

Intended outcome:

const { data, loading, error } = useQuery(HELLO_WORLD_QUERY);

Once the query is complete it loading should be false.

Actual outcome:

The loading state is always true. This results in the page loading infinitely.

How to reproduce the issue:

  • Add any query.
  • Use useQuery from @apollo/client@^3.0.0-beta.44.
  • Log loading.

Versions

System:

  • OS: macOS Mojave 10.14.5

Binaries:

  • Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node
  • Yarn: 1.22.4 - ~/Work/troup/client/node_modules/.bin/yarn
  • npm: 6.9.0 - ~/.nvm/versions/node/v10.16.3/bin/npm

Browsers:

  • Edge: 81.0.416.68
  • Safari: 12.1.1

npmPackages:

  • @apollo/client: ^3.0.0-beta.44 => 3.0.0-beta.44
  • apollo: ^2.27.3 => 2.27.3
  • apollo-client: ^2.6.8 => 2.6.8
  • react-apollo: ^3.1.5 => 3.1.5

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions