Skip to main content

GQty Hooks

There may be instances where the built in Faust.js hooks do not satisfy your data fetching requirements. Thankfully, GQty publishes the following hooks that can be used for custom queries, mutations, or subscriptions:

For example, you may want to get a list of your content types:

const { useQuery } = client;

const contentTypes = useQuery().contentTypes()?.nodes;

useQuery, along with all the other hooks, are typed. So you'll be able to see exactly what kind of data you have access to via your IDE's intellisense.