-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCreateItineraryLocationWithAdditionalPositions.graphql
47 lines (46 loc) · 1.57 KB
/
CreateItineraryLocationWithAdditionalPositions.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Adds a location to an itinerary, also supplying additional positions to help
# describe the location more accurately for a visiting user.
mutation createItineraryLocationWithAdditionalPositions(
$itineraryId: ID!
$longitude: Float!
$latitude: Float!
$placeId: ID
$directUserToLongitude: JSON!
$directUserToLatitude: JSON!
) {
# Use the createItineraryLocation mutation operation
createItineraryLocation(
# Supply our Itinerary to add the item to
itineraryId: $itineraryId
# Describe the location
location: {
# Ignore the place marker provided by Facebook, and instead use the
# following position preference.
position: { lon: $longitude, lat: $latitude }
# Public Space, such as Federation Square in Melbourne
place: {
id: $placeId
# This position is a fallback position in case Facebook does not respond
# with information about this place. The facebook supplied position
# will be obtained when querying this data in the future.
position: { lon: $longitude, lat: $latitude }
}
# Add in some other meaningful attributes
attrs: [
# Provide an alternative position to directions navigating to this
# location such as sending the user to the entrace for the location, or
# alternative [lon,lat]
{
id: "itinerary/location/directions-position-preference"
value: [$directUserToLongitude, $directUserToLatitude]
}
]
}
) {
# Read back the location just created
location {
__typename
id
}
}
}