Skip to content
masterclass Buddy

GraphQL · Hook

useQuery

useQuery runs a GraphQL query in a component. It returns loading, error, and data values for rendering the request state.

Last updated

Syntax

useQuery(query, { variables })

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • GraphQLClient
  • ClientContext.Provider
  • GraphQL

Source: Tools and Libraries | GraphQL. Checked 2026-11-03.