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.