vscode-apollo 2.5.6 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +17 -0
- package/.github/workflows/E2E.yml +3 -2
- package/.github/workflows/build-prs.yml +2 -1
- package/.github/workflows/release.yml +2 -2
- package/.prettierignore +3 -0
- package/.semgrepignore +2 -0
- package/.vscode/settings.json +7 -2
- package/CHANGELOG.md +12 -0
- package/apollo.connectors.mapping.configuration.json +10 -0
- package/package.json +38 -4
- package/sampleWorkspace/connectors-community/.github/ISSUE_TEMPLATE/connector-bug-report.md +36 -0
- package/sampleWorkspace/connectors-community/.github/ISSUE_TEMPLATE/new-connector.md +10 -0
- package/sampleWorkspace/connectors-community/.github/renovate.json5 +3 -0
- package/sampleWorkspace/connectors-community/.vscode/extensions.json +3 -0
- package/sampleWorkspace/connectors-community/.vscode/settings.json +13 -0
- package/sampleWorkspace/connectors-community/.vscode/tasks.json +10 -0
- package/sampleWorkspace/connectors-community/README.md +108 -0
- package/sampleWorkspace/connectors-community/apollo.config.json +5 -0
- package/sampleWorkspace/connectors-community/connectors/.template/Dockerfile +5 -0
- package/sampleWorkspace/connectors-community/connectors/.template/README +46 -0
- package/sampleWorkspace/connectors-community/connectors/.template/connector.graphql +31 -0
- package/sampleWorkspace/connectors-community/connectors/.template/router.yaml +18 -0
- package/sampleWorkspace/connectors-community/connectors/.template/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/JSONPlaceholder/README +12 -0
- package/sampleWorkspace/connectors-community/connectors/JSONPlaceholder/albums.graphql +48 -0
- package/sampleWorkspace/connectors-community/connectors/JSONPlaceholder/comments.graphql +54 -0
- package/sampleWorkspace/connectors-community/connectors/JSONPlaceholder/photos.graphql +54 -0
- package/sampleWorkspace/connectors-community/connectors/JSONPlaceholder/posts.graphql +51 -0
- package/sampleWorkspace/connectors-community/connectors/JSONPlaceholder/supergraph.yaml +26 -0
- package/sampleWorkspace/connectors-community/connectors/JSONPlaceholder/todos.graphql +51 -0
- package/sampleWorkspace/connectors-community/connectors/JSONPlaceholder/users.graphql +80 -0
- package/sampleWorkspace/connectors-community/connectors/TM-Forum/README.md +9 -0
- package/sampleWorkspace/connectors-community/connectors/TM-Forum/router.yaml +18 -0
- package/sampleWorkspace/connectors-community/connectors/TM-Forum/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/TM-Forum/tmf622-ProductOrdering.graphql +296 -0
- package/sampleWorkspace/connectors-community/connectors/adobe-commerce-cloud/README.md +7 -0
- package/sampleWorkspace/connectors-community/connectors/adobe-commerce-cloud/addresses.graphql +30 -0
- package/sampleWorkspace/connectors-community/connectors/adobe-commerce-cloud/customer.graphql +77 -0
- package/sampleWorkspace/connectors-community/connectors/adobe-commerce-cloud/products.graphql +70 -0
- package/sampleWorkspace/connectors-community/connectors/adobe-commerce-cloud/router.yaml +24 -0
- package/sampleWorkspace/connectors-community/connectors/adobe-commerce-cloud/supergraph.yaml +14 -0
- package/sampleWorkspace/connectors-community/connectors/adobe-commerce-cloud/swagger.json +69226 -0
- package/sampleWorkspace/connectors-community/connectors/anthropic/Dockerfile +5 -0
- package/sampleWorkspace/connectors-community/connectors/anthropic/README +61 -0
- package/sampleWorkspace/connectors-community/connectors/anthropic/messages.graphql +258 -0
- package/sampleWorkspace/connectors-community/connectors/anthropic/router.yaml +18 -0
- package/sampleWorkspace/connectors-community/connectors/anthropic/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/apollo-ecomm-simple/README +3 -0
- package/sampleWorkspace/connectors-community/connectors/apollo-ecomm-simple/connector.graphql +38 -0
- package/sampleWorkspace/connectors-community/connectors/apollo-ecomm-simple/router.yaml +18 -0
- package/sampleWorkspace/connectors-community/connectors/apollo-ecomm-simple/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/apple/README +36 -0
- package/sampleWorkspace/connectors-community/connectors/apple/app-store-connect.graphql +100 -0
- package/sampleWorkspace/connectors-community/connectors/apple/router.yaml +18 -0
- package/sampleWorkspace/connectors-community/connectors/apple/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/aws/README +125 -0
- package/sampleWorkspace/connectors-community/connectors/aws/dynamodb.graphql +130 -0
- package/sampleWorkspace/connectors-community/connectors/aws/json-responses/product-price.json +10 -0
- package/sampleWorkspace/connectors-community/connectors/aws/json-responses/products.json +53 -0
- package/sampleWorkspace/connectors-community/connectors/aws/lambda.graphql +179 -0
- package/sampleWorkspace/connectors-community/connectors/aws/router.yaml +54 -0
- package/sampleWorkspace/connectors-community/connectors/aws/supergraph.yaml +10 -0
- package/sampleWorkspace/connectors-community/connectors/bored/README.md +35 -0
- package/sampleWorkspace/connectors-community/connectors/bored/bored.graphql +87 -0
- package/sampleWorkspace/connectors-community/connectors/bored/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/common-room/README.md +23 -0
- package/sampleWorkspace/connectors-community/connectors/common-room/contacts.graphql +141 -0
- package/sampleWorkspace/connectors-community/connectors/common-room/json-responses/members_email_.json +61 -0
- package/sampleWorkspace/connectors-community/connectors/common-room/router.yaml +18 -0
- package/sampleWorkspace/connectors-community/connectors/common-room/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/googlemaps/README.md +58 -0
- package/sampleWorkspace/connectors-community/connectors/googlemaps/distancematrix.graphql +155 -0
- package/sampleWorkspace/connectors-community/connectors/googlemaps/places-legacy.graphql +117 -0
- package/sampleWorkspace/connectors-community/connectors/googlemaps/places.graphql +399 -0
- package/sampleWorkspace/connectors-community/connectors/googlemaps/router.yaml +18 -0
- package/sampleWorkspace/connectors-community/connectors/googlemaps/supergraph.yaml +18 -0
- package/sampleWorkspace/connectors-community/connectors/googlemaps/timezone.graphql +64 -0
- package/sampleWorkspace/connectors-community/connectors/heygen/README +105 -0
- package/sampleWorkspace/connectors-community/connectors/heygen/avatars.graphql +79 -0
- package/sampleWorkspace/connectors-community/connectors/heygen/photo-avatars.graphql +454 -0
- package/sampleWorkspace/connectors-community/connectors/heygen/router.yaml +21 -0
- package/sampleWorkspace/connectors-community/connectors/heygen/supergraph.yaml +10 -0
- package/sampleWorkspace/connectors-community/connectors/jira/README +36 -0
- package/sampleWorkspace/connectors-community/connectors/jira/connector.graphql +197 -0
- package/sampleWorkspace/connectors-community/connectors/jira/router.yaml +18 -0
- package/sampleWorkspace/connectors-community/connectors/jira/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/museums/README.md +40 -0
- package/sampleWorkspace/connectors-community/connectors/museums/chicagoArt.graphql +150 -0
- package/sampleWorkspace/connectors-community/connectors/museums/met.graphql +119 -0
- package/sampleWorkspace/connectors-community/connectors/museums/supergraph.yaml +10 -0
- package/sampleWorkspace/connectors-community/connectors/nws/README.md +45 -0
- package/sampleWorkspace/connectors-community/connectors/nws/alerts.graphql +598 -0
- package/sampleWorkspace/connectors-community/connectors/nws/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/odata/README +18 -0
- package/sampleWorkspace/connectors-community/connectors/odata/connector.graphql +171 -0
- package/sampleWorkspace/connectors-community/connectors/odata/router.yaml +18 -0
- package/sampleWorkspace/connectors-community/connectors/odata/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/openai/README.md +61 -0
- package/sampleWorkspace/connectors-community/connectors/openai/assistants.graphql +285 -0
- package/sampleWorkspace/connectors-community/connectors/openai/chat-completions.graphql +169 -0
- package/sampleWorkspace/connectors-community/connectors/openai/models.graphql +47 -0
- package/sampleWorkspace/connectors-community/connectors/openai/router.yaml +24 -0
- package/sampleWorkspace/connectors-community/connectors/openai/supergraph.yaml +14 -0
- package/sampleWorkspace/connectors-community/connectors/pokeapi/README +45 -0
- package/sampleWorkspace/connectors-community/connectors/pokeapi/games.graphql +70 -0
- package/sampleWorkspace/connectors-community/connectors/pokeapi/locations.graphql +127 -0
- package/sampleWorkspace/connectors-community/connectors/pokeapi/moves.graphql +107 -0
- package/sampleWorkspace/connectors-community/connectors/pokeapi/pokemon.graphql +539 -0
- package/sampleWorkspace/connectors-community/connectors/pokeapi/router.yaml +18 -0
- package/sampleWorkspace/connectors-community/connectors/pokeapi/supergraph.yaml +18 -0
- package/sampleWorkspace/connectors-community/connectors/strapi/README.md +75 -0
- package/sampleWorkspace/connectors-community/connectors/strapi/router.yaml +19 -0
- package/sampleWorkspace/connectors-community/connectors/strapi/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/strapi/users.graphql +227 -0
- package/sampleWorkspace/connectors-community/connectors/stripe/README.md +83 -0
- package/sampleWorkspace/connectors-community/connectors/stripe/checkout.graphql +112 -0
- package/sampleWorkspace/connectors-community/connectors/stripe/core-resources.graphql +868 -0
- package/sampleWorkspace/connectors-community/connectors/stripe/payment-methods.graphql +526 -0
- package/sampleWorkspace/connectors-community/connectors/stripe/products.graphql +162 -0
- package/sampleWorkspace/connectors-community/connectors/stripe/router.yaml +26 -0
- package/sampleWorkspace/connectors-community/connectors/stripe/supergraph.yaml +18 -0
- package/sampleWorkspace/connectors-community/connectors/supabase/README.md +80 -0
- package/sampleWorkspace/connectors-community/connectors/supabase/router.yaml +5 -0
- package/sampleWorkspace/connectors-community/connectors/supabase/supabase.graphql +143 -0
- package/sampleWorkspace/connectors-community/connectors/supabase/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/thespacedevs/README +46 -0
- package/sampleWorkspace/connectors-community/connectors/thespacedevs/agencies.graphql +193 -0
- package/sampleWorkspace/connectors-community/connectors/thespacedevs/api-throttle.graphql +33 -0
- package/sampleWorkspace/connectors-community/connectors/thespacedevs/astronauts.graphql +237 -0
- package/sampleWorkspace/connectors-community/connectors/thespacedevs/celestial-bodies.graphql +131 -0
- package/sampleWorkspace/connectors-community/connectors/thespacedevs/docking-events.graphql +3460 -0
- package/sampleWorkspace/connectors-community/connectors/thespacedevs/launches.graphql +1156 -0
- package/sampleWorkspace/connectors-community/connectors/thespacedevs/supergraph.yaml +77 -0
- package/sampleWorkspace/connectors-community/connectors/tint/README +35 -0
- package/sampleWorkspace/connectors-community/connectors/tint/accounts.graphql +69 -0
- package/sampleWorkspace/connectors-community/connectors/tint/router.yaml +21 -0
- package/sampleWorkspace/connectors-community/connectors/tint/social-feeds.graphql +62 -0
- package/sampleWorkspace/connectors-community/connectors/tint/supergraph.yaml +10 -0
- package/sampleWorkspace/connectors-community/connectors/todoist/README.md +48 -0
- package/sampleWorkspace/connectors-community/connectors/todoist/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/todoist/todoist.graphql +381 -0
- package/sampleWorkspace/connectors-community/connectors/trimblemaps/README +99 -0
- package/sampleWorkspace/connectors-community/connectors/trimblemaps/connector.graphql +66 -0
- package/sampleWorkspace/connectors-community/connectors/trimblemaps/router.yaml +18 -0
- package/sampleWorkspace/connectors-community/connectors/trimblemaps/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/twilio/README.md +44 -0
- package/sampleWorkspace/connectors-community/connectors/twilio/messages.graphql +107 -0
- package/sampleWorkspace/connectors-community/connectors/twilio/router.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/twilio/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/usgs/earthquakes/README.md +44 -0
- package/sampleWorkspace/connectors-community/connectors/usgs/earthquakes/earthquakes.graphql +235 -0
- package/sampleWorkspace/connectors-community/connectors/usgs/earthquakes/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/usgs/earthquakes-nominatum/README.md +44 -0
- package/sampleWorkspace/connectors-community/connectors/usgs/earthquakes-nominatum/earthquake-simple.graphql +87 -0
- package/sampleWorkspace/connectors-community/connectors/usgs/earthquakes-nominatum/router.yaml +3 -0
- package/sampleWorkspace/connectors-community/connectors/usgs/earthquakes-nominatum/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/usps/README +36 -0
- package/sampleWorkspace/connectors-community/connectors/usps/router.yaml +18 -0
- package/sampleWorkspace/connectors-community/connectors/usps/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/connectors/usps/tracking.graphql +118 -0
- package/sampleWorkspace/connectors-community/connectors/zendesk/README +36 -0
- package/sampleWorkspace/connectors-community/connectors/zendesk/connector.graphql +98 -0
- package/sampleWorkspace/connectors-community/connectors/zendesk/router.yaml +18 -0
- package/sampleWorkspace/connectors-community/connectors/zendesk/supergraph.yaml +6 -0
- package/sampleWorkspace/connectors-community/file-new/index.js +520 -0
- package/sampleWorkspace/connectors-community/package-lock.json +119 -0
- package/sampleWorkspace/connectors-community/package.json +20 -0
- package/sampleWorkspace/connectors-community/supergraph.yaml +6 -0
- package/sampleWorkspace/sampleWorkspace.code-workspace +29 -8
- package/src/__tests__/fixtures/textmate/test.apollo.connectors.mapping +213 -0
- package/src/__tests__/fixtures/textmate/test.connect.graphql +104 -0
- package/src/language-server/__tests__/fixtures/documents/functionCall.ts.snap +3 -3
- package/syntaxes/build.ts +266 -0
- package/syntaxes/connectors.mapping.json +532 -0
- package/syntaxes/connectors.mapping.yaml +440 -0
- package/syntaxes/graphql.connectors.json +426 -0
- package/syntaxes/graphql.connectors.yaml +254 -0
- package/syntaxes/graphql.json +8 -1
- package/syntaxes/publish.sh +43 -0
- package/syntaxes/tsconfig.json +6 -0
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
extend schema
|
|
2
|
+
@link(
|
|
3
|
+
url: "https://specs.apollo.dev/federation/v2.10"
|
|
4
|
+
import: ["@key"]
|
|
5
|
+
) # Enable this schema to use Apollo Federation features
|
|
6
|
+
@link( # Enable this schema to use Apollo Connectors
|
|
7
|
+
url: "https://specs.apollo.dev/connect/v0.2"
|
|
8
|
+
import: ["@connect", "@source"]
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
@source(
|
|
12
|
+
name: "todoist"
|
|
13
|
+
http: {
|
|
14
|
+
baseURL: "https://api.todoist.com/api/v1"
|
|
15
|
+
headers: [
|
|
16
|
+
{ name: "Authorization", value:"Bearer {$config.todoistKey}" }
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
#post projects https://developer.todoist.com/api/v1/projects
|
|
22
|
+
#get projects https://developer.todoist.com/api/v1/projects
|
|
23
|
+
#post tasks https://developer.todoist.com/api/v1/tasks
|
|
24
|
+
#get tasks https://developer.todoist.com/api/v1/tasks
|
|
25
|
+
#close task https://developer.todoist.com/api/v1/tasks/{task_id}/close
|
|
26
|
+
#update taks https://developer.todoist.com/api/v1/tasks/{task_id}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
scalar JSON
|
|
30
|
+
|
|
31
|
+
input CreateTaskInput {
|
|
32
|
+
content: String!
|
|
33
|
+
description: String
|
|
34
|
+
projectId: String
|
|
35
|
+
deadlineDate: String
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
type ProjectAccess {
|
|
39
|
+
visibility: String!
|
|
40
|
+
configuration: JSON
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
type ProjectsResponse {
|
|
44
|
+
results: [Project!]!
|
|
45
|
+
nextCursor: String
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
type Project @key(fields: "id") {
|
|
49
|
+
id: ID!
|
|
50
|
+
childOrder: Int
|
|
51
|
+
color: String
|
|
52
|
+
creatorUid: String
|
|
53
|
+
createdAt: String
|
|
54
|
+
isArchived: Boolean
|
|
55
|
+
isDeleted: Boolean
|
|
56
|
+
isFavorite: Boolean
|
|
57
|
+
isFrozen: Boolean
|
|
58
|
+
name: String
|
|
59
|
+
updatedAt: String
|
|
60
|
+
viewStyle: String
|
|
61
|
+
defaultOrder: Int
|
|
62
|
+
description: String
|
|
63
|
+
access: ProjectAccess
|
|
64
|
+
role: String
|
|
65
|
+
parentId: String
|
|
66
|
+
inboxProject: Boolean
|
|
67
|
+
isCollapsed: Boolean
|
|
68
|
+
isShared: Boolean
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
type Task @key(fields: "id") {
|
|
72
|
+
userId: ID!
|
|
73
|
+
id: ID!
|
|
74
|
+
projectId: String!
|
|
75
|
+
sectionId: String
|
|
76
|
+
parentId: String
|
|
77
|
+
addedByUid: String
|
|
78
|
+
assignedByUid: String
|
|
79
|
+
responsibleUid: String
|
|
80
|
+
labels: [String]
|
|
81
|
+
checked: Boolean
|
|
82
|
+
isDeleted: Boolean
|
|
83
|
+
addedAt: String
|
|
84
|
+
completedAt: String
|
|
85
|
+
updatedAt: String
|
|
86
|
+
priority: Int
|
|
87
|
+
childOrder: Int
|
|
88
|
+
content: String
|
|
89
|
+
description: String
|
|
90
|
+
noteCount: Int
|
|
91
|
+
dayOrder: Int
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
type TasksResponse {
|
|
95
|
+
results: [Task!]!
|
|
96
|
+
nextCursor: String
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
type Query {
|
|
100
|
+
# Project queries
|
|
101
|
+
getProjectById(id: ID!): Project
|
|
102
|
+
@connect(
|
|
103
|
+
source: "todoist"
|
|
104
|
+
http: { GET: "/projects/{$args.id}" }
|
|
105
|
+
selection: """
|
|
106
|
+
id
|
|
107
|
+
childOrder: child_order
|
|
108
|
+
color
|
|
109
|
+
creatorUid: creator_uid
|
|
110
|
+
createdAt: created_at
|
|
111
|
+
isArchived: is_archived
|
|
112
|
+
isDeleted: is_deleted
|
|
113
|
+
isFavorite: is_favorite
|
|
114
|
+
isFrozen: is_frozen
|
|
115
|
+
name
|
|
116
|
+
updatedAt: updated_at
|
|
117
|
+
viewStyle: view_style
|
|
118
|
+
defaultOrder: default_order
|
|
119
|
+
description
|
|
120
|
+
access {
|
|
121
|
+
visibility
|
|
122
|
+
configuration
|
|
123
|
+
}
|
|
124
|
+
role
|
|
125
|
+
parentId: parent_id
|
|
126
|
+
inboxProject: inbox_project
|
|
127
|
+
isCollapsed: is_collapsed
|
|
128
|
+
isShared: is_shared
|
|
129
|
+
"""
|
|
130
|
+
entity: true
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
getAllProjects: ProjectsResponse!
|
|
134
|
+
@connect(
|
|
135
|
+
source: "todoist"
|
|
136
|
+
http: { GET: "/projects" }
|
|
137
|
+
selection: """
|
|
138
|
+
results{
|
|
139
|
+
id
|
|
140
|
+
childOrder: child_order
|
|
141
|
+
color
|
|
142
|
+
creatorUid: creator_uid
|
|
143
|
+
createdAt: created_at
|
|
144
|
+
isArchived: is_archived
|
|
145
|
+
isDeleted: is_deleted
|
|
146
|
+
isFavorite: is_favorite
|
|
147
|
+
isFrozen: is_frozen
|
|
148
|
+
name
|
|
149
|
+
updatedAt: updated_at
|
|
150
|
+
viewStyle: view_style
|
|
151
|
+
defaultOrder: default_order
|
|
152
|
+
description
|
|
153
|
+
access {
|
|
154
|
+
visibility
|
|
155
|
+
configuration
|
|
156
|
+
}
|
|
157
|
+
role
|
|
158
|
+
parentId: parent_id
|
|
159
|
+
inboxProject: inbox_project
|
|
160
|
+
isCollapsed: is_collapsed
|
|
161
|
+
isShared: is_shared
|
|
162
|
+
}
|
|
163
|
+
nextCursor: next_cursor
|
|
164
|
+
"""
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
# Task queries
|
|
168
|
+
getTaskById(id: ID!): Task
|
|
169
|
+
@connect(
|
|
170
|
+
source: "todoist"
|
|
171
|
+
http: { GET: "/tasks/{$args.id}" }
|
|
172
|
+
selection: """
|
|
173
|
+
userId: user_id
|
|
174
|
+
id
|
|
175
|
+
projectId: project_id
|
|
176
|
+
sectionId: section_id
|
|
177
|
+
parentId: parent_id
|
|
178
|
+
addedByUid: added_by_uid
|
|
179
|
+
assignedByUid: assigned_by_uid
|
|
180
|
+
responsibleUid: responsible_uid
|
|
181
|
+
labels
|
|
182
|
+
checked
|
|
183
|
+
isDeleted: is_deleted
|
|
184
|
+
addedAt: added_at
|
|
185
|
+
completedAt: completed_at
|
|
186
|
+
updatedAt: updated_at
|
|
187
|
+
priority
|
|
188
|
+
childOrder: child_order
|
|
189
|
+
content
|
|
190
|
+
description
|
|
191
|
+
noteCount: note_count
|
|
192
|
+
dayOrder: day_order
|
|
193
|
+
"""
|
|
194
|
+
entity: true
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
#returns tasks in inbox, not by project
|
|
198
|
+
getAllTasks(cursor: String): TasksResponse!
|
|
199
|
+
@connect(
|
|
200
|
+
source: "todoist"
|
|
201
|
+
http: { GET: "/tasks"
|
|
202
|
+
queryParams: "cursor: $args.cursor"
|
|
203
|
+
}
|
|
204
|
+
selection: """
|
|
205
|
+
results {
|
|
206
|
+
userId: user_id
|
|
207
|
+
id
|
|
208
|
+
projectId: project_id
|
|
209
|
+
sectionId: section_id
|
|
210
|
+
parentId: parent_id
|
|
211
|
+
addedByUid: added_by_uid
|
|
212
|
+
assignedByUid: assigned_by_uid
|
|
213
|
+
responsibleUid: responsible_uid
|
|
214
|
+
labels
|
|
215
|
+
checked
|
|
216
|
+
isDeleted: is_deleted
|
|
217
|
+
addedAt: added_at
|
|
218
|
+
completedAt: completed_at
|
|
219
|
+
updatedAt: updated_at
|
|
220
|
+
priority
|
|
221
|
+
childOrder: child_order
|
|
222
|
+
content
|
|
223
|
+
description
|
|
224
|
+
noteCount: note_count
|
|
225
|
+
dayOrder: day_order
|
|
226
|
+
}
|
|
227
|
+
nextCursor: next_cursor
|
|
228
|
+
"""
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
getTasksByProject(projectId: String!, cursor: String): TasksResponse!
|
|
232
|
+
@connect(
|
|
233
|
+
source: "todoist"
|
|
234
|
+
http: { GET: "/tasks"
|
|
235
|
+
queryParams: """
|
|
236
|
+
project_id: $args.projectId
|
|
237
|
+
cursor: $args.cursor
|
|
238
|
+
"""
|
|
239
|
+
}
|
|
240
|
+
selection: """
|
|
241
|
+
results {
|
|
242
|
+
userId: user_id
|
|
243
|
+
id
|
|
244
|
+
projectId: project_id
|
|
245
|
+
sectionId: section_id
|
|
246
|
+
parentId: parent_id
|
|
247
|
+
addedByUid: added_by_uid
|
|
248
|
+
assignedByUid: assigned_by_uid
|
|
249
|
+
responsibleUid: responsible_uid
|
|
250
|
+
labels
|
|
251
|
+
checked
|
|
252
|
+
isDeleted: is_deleted
|
|
253
|
+
addedAt: added_at
|
|
254
|
+
completedAt: completed_at
|
|
255
|
+
updatedAt: updated_at
|
|
256
|
+
priority
|
|
257
|
+
childOrder: child_order
|
|
258
|
+
content
|
|
259
|
+
description
|
|
260
|
+
noteCount: note_count
|
|
261
|
+
dayOrder: day_order
|
|
262
|
+
}
|
|
263
|
+
nextCursor: next_cursor
|
|
264
|
+
"""
|
|
265
|
+
)
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
type Mutation {
|
|
269
|
+
# Project mutations
|
|
270
|
+
createProject(name: String!, description: String): Project!
|
|
271
|
+
@connect(
|
|
272
|
+
source: "todoist"
|
|
273
|
+
http: { POST: "/projects"
|
|
274
|
+
body: """
|
|
275
|
+
name: $args.name
|
|
276
|
+
description: $args.description
|
|
277
|
+
"""
|
|
278
|
+
}
|
|
279
|
+
selection: """
|
|
280
|
+
id
|
|
281
|
+
childOrder: child_order
|
|
282
|
+
color
|
|
283
|
+
creatorUid: creator_uid
|
|
284
|
+
createdAt: created_at
|
|
285
|
+
isArchived: is_archived
|
|
286
|
+
isDeleted: is_deleted
|
|
287
|
+
isFavorite: is_favorite
|
|
288
|
+
isFrozen: is_frozen
|
|
289
|
+
name
|
|
290
|
+
updatedAt: updated_at
|
|
291
|
+
viewStyle: view_style
|
|
292
|
+
defaultOrder: default_order
|
|
293
|
+
description
|
|
294
|
+
access {
|
|
295
|
+
visibility
|
|
296
|
+
configuration
|
|
297
|
+
}
|
|
298
|
+
role
|
|
299
|
+
parentId: parent_id
|
|
300
|
+
inboxProject: inbox_project
|
|
301
|
+
isCollapsed: is_collapsed
|
|
302
|
+
isShared: is_shared
|
|
303
|
+
"""
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
updateProject(id: String!, name: String, description: String): Project!
|
|
307
|
+
@connect(
|
|
308
|
+
source: "todoist"
|
|
309
|
+
http: { POST: "/projects/$args.id"
|
|
310
|
+
body: """
|
|
311
|
+
name: $args.name
|
|
312
|
+
description: $args.description
|
|
313
|
+
"""
|
|
314
|
+
}
|
|
315
|
+
selection: """
|
|
316
|
+
id
|
|
317
|
+
childOrder: child_order
|
|
318
|
+
color
|
|
319
|
+
creatorUid: creator_uid
|
|
320
|
+
createdAt: created_at
|
|
321
|
+
isArchived: is_archived
|
|
322
|
+
isDeleted: is_deleted
|
|
323
|
+
isFavorite: is_favorite
|
|
324
|
+
isFrozen: is_frozen
|
|
325
|
+
name
|
|
326
|
+
updatedAt: updated_at
|
|
327
|
+
viewStyle: view_style
|
|
328
|
+
defaultOrder: default_order
|
|
329
|
+
description
|
|
330
|
+
access {
|
|
331
|
+
visibility
|
|
332
|
+
configuration
|
|
333
|
+
}
|
|
334
|
+
role
|
|
335
|
+
parentId: parent_id
|
|
336
|
+
inboxProject: inbox_project
|
|
337
|
+
isCollapsed: is_collapsed
|
|
338
|
+
isShared: is_shared
|
|
339
|
+
"""
|
|
340
|
+
)
|
|
341
|
+
|
|
342
|
+
# Task mutations
|
|
343
|
+
createTask(input: CreateTaskInput!): Task!
|
|
344
|
+
@connect(
|
|
345
|
+
source: "todoist"
|
|
346
|
+
http: { POST: "/tasks"
|
|
347
|
+
body: "$args.input"
|
|
348
|
+
}
|
|
349
|
+
selection: """
|
|
350
|
+
userId: user_id
|
|
351
|
+
id
|
|
352
|
+
projectId: project_id
|
|
353
|
+
sectionId: section_id
|
|
354
|
+
parentId: parent_id
|
|
355
|
+
addedByUid: added_by_uid
|
|
356
|
+
assignedByUid: assigned_by_uid
|
|
357
|
+
responsibleUid: responsible_uid
|
|
358
|
+
labels
|
|
359
|
+
checked
|
|
360
|
+
isDeleted: is_deleted
|
|
361
|
+
addedAt: added_at
|
|
362
|
+
completedAt: completed_at
|
|
363
|
+
updatedAt: updated_at
|
|
364
|
+
priority
|
|
365
|
+
childOrder: child_order
|
|
366
|
+
content
|
|
367
|
+
description
|
|
368
|
+
noteCount: note_count
|
|
369
|
+
dayOrder: day_order
|
|
370
|
+
"""
|
|
371
|
+
)
|
|
372
|
+
|
|
373
|
+
closeTask(id: String!): Boolean!
|
|
374
|
+
@connect(
|
|
375
|
+
source: "todoist"
|
|
376
|
+
http: { POST: "/tasks/$args.id/close" }
|
|
377
|
+
selection: """
|
|
378
|
+
success
|
|
379
|
+
"""
|
|
380
|
+
)
|
|
381
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# TrimbleMaps REST Connector
|
|
2
|
+
|
|
3
|
+
This is an Apollo Connector that works with the TrimbleMaps API.
|
|
4
|
+
https://developer.trimblemaps.com/restful-apis/developer-guide/introduction/
|
|
5
|
+
|
|
6
|
+
To use this, you'll need to add the Trimble Maps `API_KEY` in your environment variables then running `rover` or the `router` with the config files in this folder.
|
|
7
|
+
|
|
8
|
+
## Additional Setup for VS Code Task runner
|
|
9
|
+
|
|
10
|
+
Edit your `.vscode/settings.json` to include the Strapi specific keys
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
{
|
|
14
|
+
"terminal.integrated.profiles.osx": {
|
|
15
|
+
"graphos": {
|
|
16
|
+
"path": "zsh",
|
|
17
|
+
"args": ["-l"],
|
|
18
|
+
"env": {
|
|
19
|
+
"API_KEY": "",
|
|
20
|
+
"APOLLO_KEY": "",
|
|
21
|
+
"APOLLO_GRAPH_REF": "",
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"terminal.integrated.defaultProfile.osx": "graphos"
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Then you can execute the "Tasks: Run Task" command in VS code to execute the `rover dev` task or simply open a new terminal window in vscode with the `graphos` profile, then you can simply run `rover dev --supergraph-config supergraph.yaml --router-config router.yaml`.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## Query by address
|
|
34
|
+
|
|
35
|
+
Example usage:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
query locationByAddress($address: String!, $city: String!, $state: String!) {
|
|
39
|
+
locationByAddress(address: $address, city: $city, state: $state) {
|
|
40
|
+
lat
|
|
41
|
+
long
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Pass address, city and state as strings.
|
|
47
|
+
Works with North America addresses only
|
|
48
|
+
|
|
49
|
+
Example:
|
|
50
|
+
`1600 Pennsylvania Avenue NW, Washington, DC`
|
|
51
|
+
|
|
52
|
+
Returns:
|
|
53
|
+
```
|
|
54
|
+
{
|
|
55
|
+
"data": {
|
|
56
|
+
"locationByAddress": {
|
|
57
|
+
"lat": "38.897675",
|
|
58
|
+
"long": "-77.036547"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Query By Lat/Long coordinates
|
|
65
|
+
|
|
66
|
+
Example usage:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
query addressByGeo($lat: String!, $long: String!) {
|
|
70
|
+
addressByGeo(lat: $lat, long: $long) {
|
|
71
|
+
shortFormatted
|
|
72
|
+
timezone
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Pass Lat, long as strings
|
|
78
|
+
Works worldwide and returns Address and Timezone
|
|
79
|
+
|
|
80
|
+
Example:
|
|
81
|
+
`48.8584° N, 2.2945° E is the Eiffel Tower`
|
|
82
|
+
|
|
83
|
+
Returns:
|
|
84
|
+
{
|
|
85
|
+
"data": {
|
|
86
|
+
"addressByGeo": {
|
|
87
|
+
"shortFormatted": "2 Avenue Gustave Eiffel, 75007 Paris, Île-de-France, FR, Paris",
|
|
88
|
+
"timezone": "GMT+1:00"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## Contributing
|
|
95
|
+
|
|
96
|
+
Currently this connector supports a portion of the single search API
|
|
97
|
+
https://developer.trimblemaps.com/restful-apis/location/single-search/single-search-api/. There is an opporunity to build out and expose more of the single search parameters.
|
|
98
|
+
|
|
99
|
+
In addition, there are a few premium/paid access APIs that Trimble Maps has available such as Routing and Distance Matrix.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
extend schema
|
|
2
|
+
@link(
|
|
3
|
+
url: "https://specs.apollo.dev/federation/v2.10"
|
|
4
|
+
import: ["@key", "@requires"]
|
|
5
|
+
)
|
|
6
|
+
@link(
|
|
7
|
+
url: "https://specs.apollo.dev/connect/v0.2"
|
|
8
|
+
import: ["@source", "@connect"]
|
|
9
|
+
)
|
|
10
|
+
@source(
|
|
11
|
+
name: "trimblemaps"
|
|
12
|
+
http: {
|
|
13
|
+
baseURL: "https://singlesearch.alk.com/"
|
|
14
|
+
headers: [{ name: "Authorization", value: "{$config.api}" }]
|
|
15
|
+
}
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
type Address {
|
|
19
|
+
shortFormatted: String
|
|
20
|
+
timezone: String!
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
type Geo {
|
|
24
|
+
lat: String!
|
|
25
|
+
long: String!
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type Query {
|
|
29
|
+
"""
|
|
30
|
+
PC*Miler Web Services - Single Search - https://developer.trimblemaps.com/restful-apis/location/single-search/single-search-api/
|
|
31
|
+
"""
|
|
32
|
+
addressByGeo(lat: String!, long: String!): Address
|
|
33
|
+
@connect(
|
|
34
|
+
source: "trimblemaps"
|
|
35
|
+
http: {
|
|
36
|
+
GET: "ww/api/search"
|
|
37
|
+
queryParams: """
|
|
38
|
+
query: $([$args.lat, $args.long])->joinNotNull(",")
|
|
39
|
+
matchNamedRoadsOnly: $('true')
|
|
40
|
+
maxCleanupMiles: $('0.2')
|
|
41
|
+
"""
|
|
42
|
+
}
|
|
43
|
+
selection: """
|
|
44
|
+
# https://developer.trimblemaps.com/restful-apis/location/single-search/single-search-api/#kbd-classkbd-get-roundedgetkbd-search
|
|
45
|
+
shortFormatted:Locations->first.ShortString
|
|
46
|
+
timezone:Locations->first.TimeZone
|
|
47
|
+
"""
|
|
48
|
+
)
|
|
49
|
+
locationByAddress(address: String!, city: String!, state: String!): Geo
|
|
50
|
+
@connect(
|
|
51
|
+
source: "trimblemaps"
|
|
52
|
+
http: {
|
|
53
|
+
GET: "na/api/search"
|
|
54
|
+
queryParams: """
|
|
55
|
+
query: $([$args.address, $args.city])->joinNotNull(",")
|
|
56
|
+
states: $args.state
|
|
57
|
+
countries: $('US')
|
|
58
|
+
"""
|
|
59
|
+
}
|
|
60
|
+
selection: """
|
|
61
|
+
# https://developer.trimblemaps.com/restful-apis/location/single-search/single-search-api/#kbd-classkbd-get-roundedgetkbd-search
|
|
62
|
+
lat:Locations->first.Coords.Lat
|
|
63
|
+
long:Locations->first.Coords.Lon
|
|
64
|
+
"""
|
|
65
|
+
)
|
|
66
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
supergraph:
|
|
2
|
+
listen: 127.0.0.1:4000
|
|
3
|
+
|
|
4
|
+
headers:
|
|
5
|
+
all:
|
|
6
|
+
request:
|
|
7
|
+
- propagate:
|
|
8
|
+
matching: .*
|
|
9
|
+
telemetry:
|
|
10
|
+
instrumentation:
|
|
11
|
+
spans:
|
|
12
|
+
mode: spec_compliant
|
|
13
|
+
|
|
14
|
+
connectors:
|
|
15
|
+
subgraphs:
|
|
16
|
+
connector:
|
|
17
|
+
$config:
|
|
18
|
+
api: ${env.API_KEY}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Twilio REST API Connector
|
|
2
|
+
|
|
3
|
+
This connector implements implements Twilio SMS APis and current covers sending and querying messages.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
To use this connector you must have a Twilio account and verified phone number. See [Twilio documentation](https://www.twilio.com/docs/messaging/api/message-resource) for more information
|
|
8
|
+
|
|
9
|
+
A Base64 encoded Bearer token is required. Generate this value and store it in your env.
|
|
10
|
+
|
|
11
|
+
## Getting Started
|
|
12
|
+
|
|
13
|
+
1. Create an [Apollo Studio](https://studio.apollographql.com/) account. This will provide the abilty to create and manage your graph including necesary credentials APOLLO_KEY and APOLLO_GRAPH_REF
|
|
14
|
+
2. [Install](https://www.apollographql.com/docs/rover/getting-started#installation-methods) and [authenticate](https://www.apollographql.com/docs/rover/configuring) Rover CLI to configure your graph and run locally.
|
|
15
|
+
3. Run `rover init` to generate a new connector. See the [Rover CLI documentation](https://www.apollographql.com/docs/rover) for more information and commands.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Additional Setup for VS Code Task runner
|
|
19
|
+
|
|
20
|
+
Edit your `.vscode/settings.json` to include the following keys:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
{
|
|
24
|
+
"terminal.integrated.profiles.osx": {
|
|
25
|
+
"graphos": {
|
|
26
|
+
"path": "zsh",
|
|
27
|
+
"args": ["-l"],
|
|
28
|
+
"env": {
|
|
29
|
+
"API_KEY": "",
|
|
30
|
+
"APOLLO_KEY": "",
|
|
31
|
+
...
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"terminal.integrated.defaultProfile.osx": "graphos"
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Once you've set this up, you can execute the `Tasks: Run Task` command in VS Code to run the `rover dev` task.
|
|
40
|
+
Alternatively, you can open a new terminal window in VS Code with the `graphos` profile, then run `rover dev --supergraph-config supergraph.yaml --router-config router.yaml`.
|
|
41
|
+
|
|
42
|
+
## Contributing
|
|
43
|
+
|
|
44
|
+
If you are interested in contributing to this or other connectors we welcome contributions. PLease see the [contributing guide](https://github.com/apollographql/connectors-community?tab=readme-ov-file#contributing-a-connector-to-the-community) for more information
|