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