vscode-apollo 2.5.5 → 2.6.0
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 +25 -5
- package/.github/workflows/build-prs.yml +2 -1
- package/.prettierignore +3 -0
- package/.semgrepignore +2 -0
- package/.vscode/settings.json +7 -2
- package/CHANGELOG.md +14 -0
- package/apollo.connectors.mapping.configuration.json +10 -0
- package/package.json +39 -5
- 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/rover/apollo.config.yaml +1 -1
- package/sampleWorkspace/rover/supergraph.yaml +4 -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/__e2e__/configFileTypes.e2e.ts +2 -2
- package/src/language-server/__e2e__/rover.e2e.ts +37 -49
- package/src/language-server/__tests__/fixtures/documents/functionCall.ts.snap +3 -3
- package/src/language-server/config/config.ts +4 -2
- 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 +22 -1
- package/syntaxes/tsconfig.json +6 -0
|
@@ -1,32 +1,53 @@
|
|
|
1
1
|
{
|
|
2
2
|
"folders": [
|
|
3
3
|
{
|
|
4
|
-
"path": "localSchema"
|
|
4
|
+
"path": "localSchema"
|
|
5
5
|
},
|
|
6
6
|
{
|
|
7
|
-
"path": "clientSchema"
|
|
7
|
+
"path": "clientSchema"
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
|
-
"path": "spotifyGraph"
|
|
10
|
+
"path": "spotifyGraph"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
|
-
"path": "httpSchema"
|
|
13
|
+
"path": "httpSchema"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
|
-
"path": "localSchemaArray"
|
|
16
|
+
"path": "localSchemaArray"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
|
-
"path": "rover"
|
|
19
|
+
"path": "rover"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
"path": "configFileTypes"
|
|
22
|
+
"path": "configFileTypes"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
"path": "../src/language-server/__tests__/fixtures/documents"
|
|
25
|
+
"path": "../src/language-server/__tests__/fixtures/documents"
|
|
26
26
|
},
|
|
27
|
+
{
|
|
28
|
+
"path": "../src/__tests__/fixtures"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"path": "connectors-community/connectors"
|
|
32
|
+
}
|
|
27
33
|
],
|
|
28
34
|
"settings": {
|
|
29
35
|
"apollographql.devTools.showPanel": "detect",
|
|
30
36
|
"apollographql.devTools.serverPort": 7095,
|
|
37
|
+
"editor.tokenColorCustomizations": {
|
|
38
|
+
"textMateRules": [
|
|
39
|
+
{
|
|
40
|
+
"scope": [ "meta.repository" ],
|
|
41
|
+
"settings": { "fontStyle": "underline" }
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"scope": ["meta.repository.Comment.identifier"],
|
|
45
|
+
"settings": {
|
|
46
|
+
"foreground": "#ffffff17",
|
|
47
|
+
"fontStyle": ""
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
31
52
|
},
|
|
32
53
|
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# SYNTAX TEST "source.apollo.connectors.mapping"
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
foo
|
|
5
|
+
#<--- repository.NamedFieldSelection
|
|
6
|
+
foo bar
|
|
7
|
+
#<--- repository.NamedFieldSelection
|
|
8
|
+
# ^ - repository.NamedFieldSelection
|
|
9
|
+
# ^^^ repository.NamedFieldSelection
|
|
10
|
+
alias: field
|
|
11
|
+
#<------------ repository.NamedFieldSelection
|
|
12
|
+
|
|
13
|
+
$( foo )
|
|
14
|
+
#<-------- repository.ExprPath
|
|
15
|
+
$( foo ).bar
|
|
16
|
+
#<------------ repository.ExprPath
|
|
17
|
+
# ^^^^ repository.PathStepDotAccess
|
|
18
|
+
$( foo )->bar
|
|
19
|
+
#<------------- repository.ExprPath
|
|
20
|
+
# ^^^^^ repository.PathStepArrowAccess
|
|
21
|
+
$( foo )->bar("asd")
|
|
22
|
+
#<-------------------- repository.ExprPath
|
|
23
|
+
# ^^^^^^^^^^^^ repository.PathStepArrowMethodArgs
|
|
24
|
+
# ^^^^^ repository.LitString
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
$( foo )->ma("asd") # not builtin function
|
|
28
|
+
# ^^ repository.PathStepArrowMethodArgs.beginCaptures.2
|
|
29
|
+
# ^^ - repository.PathStepArrowMethodArgs.beginCaptures.3
|
|
30
|
+
$( foo )->map("asd") # builtin function
|
|
31
|
+
# ^^^ repository.PathStepArrowMethodArgs.beginCaptures.2
|
|
32
|
+
# ^^^ repository.PathStepArrowMethodArgs.beginCaptures.3
|
|
33
|
+
|
|
34
|
+
$foo
|
|
35
|
+
#<-------- repository.VarPath
|
|
36
|
+
$foo.bar
|
|
37
|
+
#<-------- repository.VarPath
|
|
38
|
+
# ^^^^ repository.PathStepDotAccess
|
|
39
|
+
$foo->bar
|
|
40
|
+
#<--------- repository.VarPath
|
|
41
|
+
# ^^^^^ repository.PathStepArrowAccess
|
|
42
|
+
$foo->bar("asd")
|
|
43
|
+
#<---------------- repository.VarPath
|
|
44
|
+
# ^^^^^^^^^^^^ repository.PathStepArrowMethodArgs
|
|
45
|
+
# ^^^^^ repository.LitString
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
asd.bar
|
|
49
|
+
#<------- repository.KeyPath
|
|
50
|
+
# ^^^^ repository.PathStepDotAccess
|
|
51
|
+
asd->bar
|
|
52
|
+
#<-------- repository.KeyPath
|
|
53
|
+
# ^^^^^ repository.PathStepArrowAccess
|
|
54
|
+
asd->bar("asd")
|
|
55
|
+
#<--------------- repository.KeyPath
|
|
56
|
+
# ^^^^^^^^^^^^ repository.PathStepArrowMethodArgs
|
|
57
|
+
# ^^^^^ repository.LitString
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
"asd".bar
|
|
61
|
+
#<--------- repository.KeyPath
|
|
62
|
+
# ^^^^ repository.PathStepDotAccess
|
|
63
|
+
"asd"->bar
|
|
64
|
+
#<---------- repository.KeyPath
|
|
65
|
+
# ^^^^^ repository.PathStepArrowAccess
|
|
66
|
+
"asd"->bar("asd")
|
|
67
|
+
#<----------------- repository.KeyPath
|
|
68
|
+
# ^^^^^^^^^^^^ repository.PathStepArrowMethodArgs
|
|
69
|
+
# ^^^^^ repository.LitString
|
|
70
|
+
|
|
71
|
+
## AtPath
|
|
72
|
+
@
|
|
73
|
+
#<~ repository.AtPath
|
|
74
|
+
@.bar
|
|
75
|
+
#<----- repository.AtPath
|
|
76
|
+
#^^^^ repository.PathStepDotAccess
|
|
77
|
+
@->bar
|
|
78
|
+
#<------ repository.AtPath
|
|
79
|
+
#^^^^^ repository.PathStepArrowAccess
|
|
80
|
+
@->bar("asd")
|
|
81
|
+
#<------------- repository.AtPath
|
|
82
|
+
#^^^^^^^^^^^^ repository.PathStepArrowMethodArgs
|
|
83
|
+
# ^^^^^ repository.LitString
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
@->a("asd")
|
|
87
|
+
# ^^^^^ repository.LitString
|
|
88
|
+
#^^^^ ^ - repository.LitString
|
|
89
|
+
@->a("a'd")
|
|
90
|
+
# ^^^^^ repository.LitString
|
|
91
|
+
#^^^^ ^ - repository.LitString
|
|
92
|
+
@->a("asd\\")
|
|
93
|
+
# ^^^^^^^ repository.LitString
|
|
94
|
+
#^^^^ ^ - repository.LitString
|
|
95
|
+
@->a("asd\"")
|
|
96
|
+
# ^^^^^^^ repository.LitString
|
|
97
|
+
#^^^^ ^ - repository.LitString
|
|
98
|
+
@->a("asd\\\"")
|
|
99
|
+
# ^^^^^^^^^ repository.LitString
|
|
100
|
+
#^^^^ ^ - repository.LitString
|
|
101
|
+
@->a("asd\\\\")
|
|
102
|
+
# ^^^^^^^^^ repository.LitString
|
|
103
|
+
#^^^^ ^ - repository.LitString
|
|
104
|
+
@->a("as\"d
|
|
105
|
+
# ^^^^^^ repository.LitString
|
|
106
|
+
#^^^^ - repository.LitString
|
|
107
|
+
as\\d")
|
|
108
|
+
#<----- repository.LitString
|
|
109
|
+
# ^ - repository.LitString
|
|
110
|
+
@->a('asd')
|
|
111
|
+
# ^^^^^ repository.LitString
|
|
112
|
+
#^^^^ ^ - repository.LitString
|
|
113
|
+
@->a('a"d')
|
|
114
|
+
# ^^^^^ repository.LitString
|
|
115
|
+
#^^^^ ^ - repository.LitString
|
|
116
|
+
@->a('asd\\')
|
|
117
|
+
# ^^^^^^^ repository.LitString
|
|
118
|
+
#^^^^ ^ - repository.LitString
|
|
119
|
+
@->a('asd\'')
|
|
120
|
+
# ^^^^^^^ repository.LitString
|
|
121
|
+
#^^^^ ^ - repository.LitString
|
|
122
|
+
@->a('asd\\\'')
|
|
123
|
+
# ^^^^^^^^^ repository.LitString
|
|
124
|
+
#^^^^ ^ - repository.LitString
|
|
125
|
+
@->a('asd\\\\')
|
|
126
|
+
# ^^^^^^^^^ repository.LitString
|
|
127
|
+
#^^^^ ^ - repository.LitString
|
|
128
|
+
@->a('as\'d
|
|
129
|
+
# ^^^^^^ repository.LitString
|
|
130
|
+
#^^^^ - repository.LitString
|
|
131
|
+
as\\d')
|
|
132
|
+
#<----- repository.LitString
|
|
133
|
+
# ^ - repository.LitString
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
@->a(1)
|
|
137
|
+
# ^ repository.LitNumber
|
|
138
|
+
@->a(-1)
|
|
139
|
+
# ^^ repository.LitNumber
|
|
140
|
+
@->a(1.0)
|
|
141
|
+
# ^^^ repository.LitNumber
|
|
142
|
+
@->a(-1.0)
|
|
143
|
+
# ^^^^ repository.LitNumber
|
|
144
|
+
@->a(1.)
|
|
145
|
+
# ^^ repository.LitNumber
|
|
146
|
+
@->a(-1.)
|
|
147
|
+
# ^^^ repository.LitNumber
|
|
148
|
+
@->a(.0)
|
|
149
|
+
# ^^ repository.LitNumber
|
|
150
|
+
@->a(-.0)
|
|
151
|
+
# ^^^ repository.LitNumber
|
|
152
|
+
|
|
153
|
+
@->a(true)
|
|
154
|
+
# ^^^^ repository.LitPrimitive.patterns.2
|
|
155
|
+
@->a(false)
|
|
156
|
+
# ^^^^^ repository.LitPrimitive.patterns.2
|
|
157
|
+
@->a(null)
|
|
158
|
+
# ^^^^ repository.LitPrimitive.patterns.2
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
@->a({ foo: 1, bar: "baz" })
|
|
162
|
+
# ^^^^^^^^^^^^^^^^^^^^^^ repository.LitObject
|
|
163
|
+
# ^^^^^^ ^^^^^^^^^^ repository.LitProperty
|
|
164
|
+
# ^^ ^^ ^^ - repository.LitProperty
|
|
165
|
+
|
|
166
|
+
@->a({
|
|
167
|
+
# ^ repository.LitObject
|
|
168
|
+
a: 1,
|
|
169
|
+
#<--------------------------- repository.LitObject
|
|
170
|
+
# ^ repository.LitNumber
|
|
171
|
+
# ^^^^ repository.LitProperty
|
|
172
|
+
# ^ - repository.LitProperty
|
|
173
|
+
b: "asd",
|
|
174
|
+
#<--------------------------- repository.LitObject
|
|
175
|
+
# ^^^^^ repository.LitString
|
|
176
|
+
# ^^^^^^^^ repository.LitProperty
|
|
177
|
+
# ^ - repository.LitProperty
|
|
178
|
+
c: { foo: 1, bar: "baz" }
|
|
179
|
+
#<--------------------------- repository.LitObject
|
|
180
|
+
})
|
|
181
|
+
#<~ repository.LitObject
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
@->a([ 1, "a", { foo: 1 } ])
|
|
185
|
+
# ^^^^^^^^^^^^^^^^^^^^^^ repository.LitArray
|
|
186
|
+
# ^ repository.LitNumber
|
|
187
|
+
# ^^^ repository.LitString
|
|
188
|
+
# ^^^^^^^^^^ repository.LitObject
|
|
189
|
+
# ^^^^^^ repository.LitProperty
|
|
190
|
+
# ^ repository.LitNumber
|
|
191
|
+
|
|
192
|
+
@->a([
|
|
193
|
+
# ^ repository.LitArray
|
|
194
|
+
1,
|
|
195
|
+
#<--------- repository.LitArray
|
|
196
|
+
# ^ repository.LitNumber
|
|
197
|
+
"a",
|
|
198
|
+
#<--------- repository.LitArray
|
|
199
|
+
# ^^^ repository.LitString
|
|
200
|
+
{foo:1}
|
|
201
|
+
#<--------- repository.LitArray
|
|
202
|
+
# ^^^^^^^ repository.LitObject
|
|
203
|
+
# ^^^^^ repository.LitProperty
|
|
204
|
+
# ^ repository.LitNumber
|
|
205
|
+
])
|
|
206
|
+
#<~ repository.LitArray
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
@->a("y"->foo)
|
|
210
|
+
# ^^^^^ repository.LitPathTail
|
|
211
|
+
|
|
212
|
+
@->a("y" || "foo" + $asd)
|
|
213
|
+
# ^^ ^ repository.LitOpChainCenter
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# SYNTAX TEST "source.graphql"
|
|
2
|
+
|
|
3
|
+
type Query {
|
|
4
|
+
post(id: ID!): Post
|
|
5
|
+
@connect(
|
|
6
|
+
source: "jsonPlaceholder"
|
|
7
|
+
# ^^^^^^^^^^^^^^^^^^ - repository.JSONSelectionString
|
|
8
|
+
http: {
|
|
9
|
+
GET: "/posts/{ $args.id }"
|
|
10
|
+
# ^^^^^^^^^^^^^^^^^^^^^ repository.JSONSelectionString
|
|
11
|
+
# ^^^^^^^^^^^^ repository.JSONSelectionString.patterns.embedded
|
|
12
|
+
# ^^^^^^^^ ^ - repository.JSONSelectionString.patterns.embedded
|
|
13
|
+
# ^^^^^^^^ repository.VarPath
|
|
14
|
+
# ^^^^^^^^^^ ^^^ - repository.VarPath
|
|
15
|
+
POST: "/posts/{ $args.id }"
|
|
16
|
+
# ^^^^^^^^^^^^^^^^^^^^^ repository.JSONSelectionString
|
|
17
|
+
# ^^^^^^^^^^^^ repository.JSONSelectionString.patterns.embedded
|
|
18
|
+
# ^^^^^^^^ ^ - repository.JSONSelectionString.patterns.embedded
|
|
19
|
+
# ^^^^^^^^ repository.VarPath
|
|
20
|
+
# ^^^^^^^^^^ ^^^ - repository.VarPath
|
|
21
|
+
PATCH: "/posts/{ $args.id }"
|
|
22
|
+
# ^^^^^^^^^^^^^^^^^^^^^ repository.JSONSelectionString
|
|
23
|
+
# ^^^^^^^^^^^^ repository.JSONSelectionString.patterns.embedded
|
|
24
|
+
# ^^^^^^^^ ^ - repository.JSONSelectionString.patterns.embedded
|
|
25
|
+
# ^^^^^^^^ repository.VarPath
|
|
26
|
+
# ^^^^^^^^^^ ^^^ - repository.VarPath
|
|
27
|
+
DELETE: "/posts/{ $args.id }"
|
|
28
|
+
# ^^^^^^^^^^^^^^^^^^^^^ repository.JSONSelectionString
|
|
29
|
+
# ^^^^^^^^^^^^ repository.JSONSelectionString.patterns.embedded
|
|
30
|
+
# ^^^^^^^^ ^ - repository.JSONSelectionString.patterns.embedded
|
|
31
|
+
# ^^^^^^^^ repository.VarPath
|
|
32
|
+
# ^^^^^^^^^^ ^^^ - repository.VarPath
|
|
33
|
+
PUT: "/posts/{ $args.id }"
|
|
34
|
+
# ^^^^^^^^^^^^^^^^^^^^^ repository.JSONSelectionString
|
|
35
|
+
# ^^^^^^^^^^^^ repository.JSONSelectionString.patterns.embedded
|
|
36
|
+
# ^^^^^^^^ ^ - repository.JSONSelectionString.patterns.embedded
|
|
37
|
+
# ^^^^^^^^ repository.VarPath
|
|
38
|
+
# ^^^^^^^^^^ ^^^ - repository.VarPath
|
|
39
|
+
headers: [{ name: "Authorization", value: "Bearer {$config.apiKey}" }]
|
|
40
|
+
# ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ repository.JSONSelectionString
|
|
41
|
+
# ^^^^^^^^^^^^^^^^ repository.JSONSelectionString.patterns.embedded
|
|
42
|
+
# ^^^^^^^^^^^^^^ repository.VarPath
|
|
43
|
+
headers: [
|
|
44
|
+
{ name: "Authorization", value: "Bearer {$config.apiKey}" }
|
|
45
|
+
# ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ repository.JSONSelectionString
|
|
46
|
+
# ^^^^^^^^^^^^^^^^ repository.JSONSelectionString.patterns.embedded
|
|
47
|
+
# ^^^^^^^^^^^^^^ repository.VarPath
|
|
48
|
+
]
|
|
49
|
+
headers: [
|
|
50
|
+
{
|
|
51
|
+
name: "Authorization",
|
|
52
|
+
# ^^^^^^^^^^^^^^^ repository.JSONSelectionString
|
|
53
|
+
value: "Bearer {$config.apiKey}"
|
|
54
|
+
# ^^^^^^^^^^^^^^^^^^^^^^^^ repository.JSONSelectionString
|
|
55
|
+
# ^^^^^^^^^^^^^^ repository.JSONSelectionString.patterns.embedded repository.VarPath
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
body: """
|
|
59
|
+
# ^^^^^^^^^^^^^^^ - meta.embedded.block.connectors.mapping.graphql
|
|
60
|
+
# ^^^^^^^^^^^^^^^^^^^^^ meta.embedded.block.connectors.mapping.graphql
|
|
61
|
+
listing: {
|
|
62
|
+
#<------------------------------------ meta.embedded.block.connectors.mapping.graphql
|
|
63
|
+
# ^^^^^^^ repository.NamedSelection.patterns.3.beginCaptures.1
|
|
64
|
+
# ^ repository.SubSelection
|
|
65
|
+
title: $args.input.title
|
|
66
|
+
#<------------------------------------ meta.embedded.block.connectors.mapping.graphql
|
|
67
|
+
#<------------------------------------ repository.SubSelection
|
|
68
|
+
# ^^^^^ repository.NamedSelection.patterns.0.beginCaptures.1
|
|
69
|
+
# ^^^^^^^^^^^^^^^^^ repository.VarPath
|
|
70
|
+
}
|
|
71
|
+
#<------------------------------------ meta.embedded.block.connectors.mapping.graphql
|
|
72
|
+
#<-------- repository.SubSelection
|
|
73
|
+
"""
|
|
74
|
+
#^^^^^^^ meta.embedded.block.connectors.mapping.graphql
|
|
75
|
+
# ^^^^^^^^^^^^^^^^^^^^^^^^^ - meta.embedded.block.connectors.mapping.graphql
|
|
76
|
+
body: "foo: bar $.root { a }"
|
|
77
|
+
# ^^^^^^^^^^^^^^^^^^^^^ meta.embedded.line.connectors.mapping.graphql
|
|
78
|
+
#^^^^^^^^^^^^ ^ - meta.embedded.line.connectors.mapping.graphql
|
|
79
|
+
# ^^^^^^^^ ^ repository.NamedFieldSelection
|
|
80
|
+
# ^^^^^^ repository.VarPath
|
|
81
|
+
}
|
|
82
|
+
selection: """
|
|
83
|
+
# ^^^^^^^^^^^^^^^^^^ - meta.embedded.block.connectors.mapping.graphql
|
|
84
|
+
# ^^^^^^^^^^^^^^^^^^ meta.embedded.block.connectors.mapping.graphql
|
|
85
|
+
foo: bar
|
|
86
|
+
#<------------------------------------ meta.embedded.block.connectors.mapping.graphql
|
|
87
|
+
# ^^^^^^^^ repository.NamedFieldSelection
|
|
88
|
+
$.root {
|
|
89
|
+
#<------------------------------------ meta.embedded.block.connectors.mapping.graphql
|
|
90
|
+
# ^^^^^^ repository.VarPath
|
|
91
|
+
a
|
|
92
|
+
#<------------------------------------ meta.embedded.block.connectors.mapping.graphql
|
|
93
|
+
}
|
|
94
|
+
#<------------------------------------ meta.embedded.block.connectors.mapping.graphql
|
|
95
|
+
"""
|
|
96
|
+
#^^^^^ meta.embedded.block.connectors.mapping.graphql
|
|
97
|
+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - meta.embedded.block.connectors.mapping.graphql
|
|
98
|
+
selection: "foo: bar $.root { a }"
|
|
99
|
+
# ^^^^^^^^^^^^^^^^^^^^^ meta.embedded.line.connectors.mapping.graphql
|
|
100
|
+
#^^^^^^^^^^^^^^^^^ ^ - meta.embedded.line.connectors.mapping.graphql
|
|
101
|
+
# ^^^^^^^^ ^ repository.NamedFieldSelection
|
|
102
|
+
# ^^^^^^ repository.VarPath
|
|
103
|
+
)
|
|
104
|
+
}
|
|
@@ -21,14 +21,14 @@ test.each([
|
|
|
21
21
|
] as const)("%s with `type: '%s'`", async (project, moduleType) => {
|
|
22
22
|
await writeFile(
|
|
23
23
|
resolveRelativeToSampleWorkspace(`configFileTypes/${project}/package.json`),
|
|
24
|
-
JSON.stringify(
|
|
24
|
+
`${JSON.stringify(
|
|
25
25
|
{
|
|
26
26
|
name: "test",
|
|
27
27
|
type: moduleType,
|
|
28
28
|
},
|
|
29
29
|
undefined,
|
|
30
30
|
2,
|
|
31
|
-
)
|
|
31
|
+
)}\n`,
|
|
32
32
|
"utf-8",
|
|
33
33
|
);
|
|
34
34
|
await reloadService();
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import { test as origTest } from "@jest/globals";
|
|
2
|
-
import { load } from "js-yaml";
|
|
3
|
-
import { readFileSync } from "node:fs";
|
|
4
|
-
import { execFileSync } from "node:child_process";
|
|
5
|
-
import { join } from "node:path";
|
|
6
|
-
import { ParsedApolloConfigFormat } from "../config";
|
|
7
1
|
import { TextEditor } from "vscode";
|
|
8
2
|
import {
|
|
9
3
|
closeAllEditors,
|
|
@@ -16,36 +10,6 @@ import {
|
|
|
16
10
|
getDefinitions,
|
|
17
11
|
} from "./utils";
|
|
18
12
|
|
|
19
|
-
// we want to skip these tests unless the user running them has a rover config profile named "VSCode-E2E"
|
|
20
|
-
let test = origTest.skip;
|
|
21
|
-
try {
|
|
22
|
-
const roverProjectDir = join(__dirname, "../../../sampleWorkspace/rover");
|
|
23
|
-
const config = load(
|
|
24
|
-
readFileSync(join(roverProjectDir, "apollo.config.yaml"), "utf-8"),
|
|
25
|
-
) as ParsedApolloConfigFormat;
|
|
26
|
-
const roverBin = join(roverProjectDir, config.rover!.bin);
|
|
27
|
-
const result = execFileSync(roverBin, [
|
|
28
|
-
"config",
|
|
29
|
-
"list",
|
|
30
|
-
"--format=json",
|
|
31
|
-
]).toString("utf8");
|
|
32
|
-
const parsed = JSON.parse(result);
|
|
33
|
-
if (parsed.data.profiles.includes("VSCode-E2E")) {
|
|
34
|
-
test = origTest;
|
|
35
|
-
}
|
|
36
|
-
} catch (e) {}
|
|
37
|
-
if (test === origTest.skip) {
|
|
38
|
-
console.info(
|
|
39
|
-
"Skipping rover E2E tests: no profile with the name 'VSCode-E2E'\n" +
|
|
40
|
-
"You can create one by running `rover config auth --profile VSCode-E2E`",
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (process.platform === "win32") {
|
|
45
|
-
console.info("Skipping rover E2E tests in Windows");
|
|
46
|
-
test = origTest.skip;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
13
|
let editor: TextEditor;
|
|
50
14
|
let getPosition: GetPositionFn;
|
|
51
15
|
beforeAll(async () => {
|
|
@@ -73,47 +37,71 @@ test("completion", async () => {
|
|
|
73
37
|
[
|
|
74
38
|
{
|
|
75
39
|
"detail": undefined,
|
|
40
|
+
"label": "@authenticated",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"detail": "",
|
|
76
44
|
"label": "@deprecated",
|
|
77
45
|
},
|
|
78
46
|
{
|
|
79
|
-
"detail":
|
|
47
|
+
"detail": "",
|
|
80
48
|
"label": "@external",
|
|
81
49
|
},
|
|
82
50
|
{
|
|
83
51
|
"detail": undefined,
|
|
84
|
-
"label": "@
|
|
52
|
+
"label": "@inaccessible",
|
|
85
53
|
},
|
|
86
54
|
{
|
|
87
|
-
"detail":
|
|
88
|
-
"label": "@
|
|
55
|
+
"detail": "",
|
|
56
|
+
"label": "@override(…)",
|
|
89
57
|
},
|
|
90
58
|
{
|
|
91
59
|
"detail": undefined,
|
|
92
|
-
"label": "@
|
|
60
|
+
"label": "@policy(…)",
|
|
93
61
|
},
|
|
94
62
|
{
|
|
95
63
|
"detail": undefined,
|
|
96
|
-
"label": "@
|
|
64
|
+
"label": "@provides(…)",
|
|
97
65
|
},
|
|
98
66
|
{
|
|
99
|
-
"detail":
|
|
100
|
-
"label": "@
|
|
67
|
+
"detail": "",
|
|
68
|
+
"label": "@requires(…)",
|
|
101
69
|
},
|
|
102
70
|
{
|
|
103
71
|
"detail": undefined,
|
|
104
|
-
"label": "@
|
|
72
|
+
"label": "@requiresScopes(…)",
|
|
105
73
|
},
|
|
106
74
|
{
|
|
107
|
-
"detail":
|
|
108
|
-
"label": "@
|
|
75
|
+
"detail": "",
|
|
76
|
+
"label": "@shareable",
|
|
109
77
|
},
|
|
110
78
|
{
|
|
111
79
|
"detail": undefined,
|
|
112
|
-
"label": "@
|
|
80
|
+
"label": "@tag(…)",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"detail": "",
|
|
84
|
+
"label": "@federation__authenticated",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"detail": "",
|
|
88
|
+
"label": "@federation__inaccessible",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"detail": "",
|
|
92
|
+
"label": "@federation__policy(…)",
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"detail": "",
|
|
96
|
+
"label": "@federation__provides(…)",
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"detail": "",
|
|
100
|
+
"label": "@federation__requiresScopes(…)",
|
|
113
101
|
},
|
|
114
102
|
{
|
|
115
103
|
"detail": undefined,
|
|
116
|
-
"label": "@
|
|
104
|
+
"label": "@federation__tag(…)",
|
|
117
105
|
},
|
|
118
106
|
]
|
|
119
107
|
`);
|
|
@@ -413,11 +413,11 @@
|
|
|
413
413
|
#^^^ source.ts variable.other.readwrite.ts
|
|
414
414
|
>(
|
|
415
415
|
#^ source.ts meta.brace.round.ts
|
|
416
|
-
> `query { test }`
|
|
416
|
+
> `query Q11 { test }`
|
|
417
417
|
#^^ source.ts
|
|
418
418
|
# ^ source.ts string.template.ts punctuation.definition.string.template.begin.ts
|
|
419
|
-
#
|
|
420
|
-
#
|
|
419
|
+
# ^^^^^^^^^^^^^^^^^^ source.ts string.template.ts
|
|
420
|
+
# ^ source.ts string.template.ts punctuation.definition.string.template.end.ts
|
|
421
421
|
> )
|
|
422
422
|
#^^ source.ts
|
|
423
423
|
# ^ source.ts meta.brace.round.ts
|
|
@@ -322,8 +322,10 @@ export abstract class ApolloConfig {
|
|
|
322
322
|
get configDirURI() {
|
|
323
323
|
// if the filepath has a _file_ in it, then we get its dir
|
|
324
324
|
return this.configURI &&
|
|
325
|
-
this.configURI.
|
|
326
|
-
? URI.
|
|
325
|
+
this.configURI.path.match(/\.(ts|js|cjs|mjs|yaml|yml|json)$/i)
|
|
326
|
+
? URI.from(this.configURI).with({
|
|
327
|
+
path: dirname(this.configURI.path),
|
|
328
|
+
})
|
|
327
329
|
: this.configURI;
|
|
328
330
|
}
|
|
329
331
|
|