To run a query within a React component, call useGetItineraryDirectionsQuery and pass it any options that fit your needs.
When your component renders, useGetItineraryDirectionsQuery 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 } = useGetItineraryDirectionsQuery({ variables: { id:// value for 'id' includeRoutePolyline: // value for 'includeRoutePolyline' }, });
useGetItineraryDirectionsQuery
To run a query within a React component, call
useGetItineraryDirectionsQuery
and pass it any options that fit your needs. When your component renders,useGetItineraryDirectionsQuery
returns an object from Apollo Client that contains loading, error, and data properties you can use to render your UI.Example