To run a query within a React component, call useGetPlaceQuery and pass it any options that fit your needs.
When your component renders, useGetPlaceQuery returns an object from Apollo Client that contains loading, error, and data properties
you can use to render your UI.
Example
const { data, loading, error } = useGetPlaceQuery({ variables: { id:// value for 'id' }, });
useGetPlaceQuery
To run a query within a React component, call
useGetPlaceQueryand pass it any options that fit your needs. When your component renders,useGetPlaceQueryreturns an object from Apollo Client that contains loading, error, and data properties you can use to render your UI.Example