useAuthenticatedFetch and useAppQuery hooks

Can you tell me the difference between these two hooks in Shopify app (frontend) , please? And in what cases it is better to use useAuthenticatedFetch or useAppQuery?

1 Like

From the documentation: useAppQuery is just a thin wrapper around useAuthenticatedFetch and react-query’s useQuery.

In other words, if you just want to fetch data and manage the response yourself, you’d use the authenticated fetch returned by useAuthenticatedFetch. But if you wanted to take advantage of the React Query package to manage your authenticated fetch calls, you’d use useAppQuery.

1 Like