import { gql, useQuery } from '@apollo/client'
const GET_CART_QUERY = gql`
query cart {
id
products {
id
quantity
brandName
itemName
stockText @client
}
}
`
const { loading, data, error } = useQuery(GET_CART_QUERY)
Invoking query
inside a React component
Apollo Client will
resolve stockText on the client-side