Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Query GraphQL Data with Urql using React Hooks


    We use urql's useQuery to fetch data from a GraphQL endpoint. We look the result of the query, which gives us access to the queries status.

    result.fetching will be true while the query is running. result.error will contain an error if the query returned an error. result.data will contain the data of our query to display to our user.