Was this helpful?

Optional Stops

Itinerary Locations can be marked as optional to indicate that they can be optionally bypassed.

1# Updates an itinerary location and marks the itinerary location as an optional
2# stop.
3
4mutation UpdateItineraryLocationAsOptional($id: ID!, $optional: Boolean!) {
5  # Use updateItineraryLocation mutation for making changes to ItineraryLocation
6  updateItineraryLocation(
7    # Supply your itinerary location that you wish to make optional
8    id: $id
9    # Supply the location fields changing
10    location: {
11      # Update the location to be marked as optional
12      optional: $optional
13    }
14  ) {
15    # Query back your location
16    location {
17      # Optional should now be true
18      optional
19    }
20    # Optionally see what else has been affected, such as a result of the
21    # autoroute behaviour updating new and existing ItineraryDirections when
22    # using this feature.
23    cascaded {
24      created {
25        id
26        __typename
27      }
28      updated {
29        id
30        __typename
31      }
32      deletedIds
33    }
34  }
35}

Sandbox: Configure | Try Operation

This is useful in representing possible optional activities that could be done along the way on a route.

Docs IconBy marking a location as optional, auto-routing default behaviour will bypass creating directions to this location.

alpaca.tech

Copyright © 2024 - Made with love ❤️ in Australia.