useLazyQuery in React component

How do I go about using useLazyQuery in a class component rather than a functional component?

const [getObjects, { loading, data }] = useLazyQuery(GET_OBJECTS_BY_ID);

This works in a functional ocmponent but how would I go about doing the same for a class component?

"use" hooks are only available in functional React components.