Skip to content

Instantly share code, notes, and snippets.

@ilxanlar
Last active August 2, 2021 00:27
Show Gist options
  • Save ilxanlar/159f0964ef97a8d030dac02735999083 to your computer and use it in GitHub Desktop.
Save ilxanlar/159f0964ef97a8d030dac02735999083 to your computer and use it in GitHub Desktop.
import useMyQuery from './useMyQuery' // Import custom useMyQuery hook
import myPostsQuery from './queries/myPostsQuery' // Import query function
function MyPosts({ category, status }) {
const { isLoading, data } = useMyQuery(myPostsQuery, {
variables: {
category,
status
}
})
// Rest of the component
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment