```js // YourPage.js | YourPage.jsx | YourPage.ts | YourPage.tsx import React from 'react'; import { useQuery, gql } from '@apollo/client'; import { PageLayout } from './PageLayout'; import { DocumentHeader } from './DocumentHeader'; import { DocumentList } from './DocumentList'; const AllInfoQuery = gql` query AllInfo { user { userID name } document { id userID title brief status } subdocuments { id userID title content status } } `; function useFetchInfo() { const { loading, error, data } = useQuery(AllInfoQuery); return { loading, error, data }; } export function DocumentScreen() { const { loading, error, data } = useFetchInfo(); if (loading) { return

Loading...

; } if (error) { return

There was an error fetching the data!

; } return ( ); } ```