-
Notifications
You must be signed in to change notification settings - Fork 0
/
UpdateItineraryPhotos.graphql
52 lines (48 loc) · 1.13 KB
/
UpdateItineraryPhotos.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
48
49
50
51
52
# Updates an itinerary with a selection of photos.
mutation UpdateItineraryPhotos(
$id: ID!
$createMedia: [CreateMediaContainerInput!]
$updateMedia: [UpdateMediaContainerInput!]
$deleteMedia: [ID!]
) {
# Use the updateItinerary() operation to update the itinerary media
updateItinerary(
# Specify the itinerary
id: $id
# Update the itinrary content
itinerary: {
# Create the itinerary media
createMedia: $createMedia
# Update the itinerary media
updateMedia: $updateMedia
# Remoe an itinerary media
deleteMedia: $deleteMedia
}
) {
# Query back the itinerary updated fields
itinerary {
id
__typename
# Read in the media
mediaContainers(first: 10) {
edges {
node {
# Media container id
id
__typename
# Read back the uploaded photo resource
resource {
# Identifiers
__typename
... on MediaImage {
id
# Content
caption
}
}
}
}
}
}
}
}