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