-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindCollectionLocationByExternalRefs.graphql
54 lines (51 loc) · 1.57 KB
/
FindCollectionLocationByExternalRefs.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
53
54
# Queries collection items based on a ID within an external platform. When
# creating locations, you can set the attributes custom://external-ref and
# custom://external-source in order to store identifiers and sources of your
# platform. This enables you to reference and query items through your own
# ID scheme. External Ref is intended to be used on a 'per record' ID, where
# External source is to reference the source of all records, and can therefore
# differentiate multiple sources of data and potentially overlapping IDs
query findCollectionLocationByExternalRefs(
$collectionIds: [ID!]
$externalIds: [ID!]
$externalSources: [ID!]
$first: Int!
$after: String
) {
collectionItems(
# Query the collection
collectionIds: $collectionIds
# Optionally query the external ID's supplied
externalIds: $externalIds
# Optionally query a specific website source
externalSources: $externalSources
# Pagination controls for relay "cursor connections"
# See: https://relay.dev/graphql/connections.htm
first: $first
after: $after
) {
edges {
node {
# Matching collection item
id
__typename
# Timestamps
created
modified
# Obtain the values for the external refs
externalId: attr(id: "custom://external-ref") {
value
}
externalSource: attr(id: "custom://external-source") {
value
}
}
# Use the cursor and supply to "after" in operation to paginate
cursor
}
pageInfo {
hasNextPage
}
totalCount
}
}