generated from rojoangel/extensibility-lab
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathmesh_config.json
More file actions
61 lines (61 loc) · 1.92 KB
/
mesh_config.json
File metadata and controls
61 lines (61 loc) · 1.92 KB
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
55
56
57
58
59
60
61
{
"meshConfig": {
"responseConfig": {
"CORS": {
"credentials": true,
"exposedHeaders": ["Content-Range", "X-Content-Range"],
"maxAge": 60480,
"methods": ["GET", "POST"],
"origin": "*"
},
"headers": {
"mode": "no-cors",
"x-include-metadata": "true"
},
"includeHTTPDetails": false
},
"sources": [
{
"name": "CommerceSaaSGraphQl",
"handler": {
"graphql": {
"endpoint": "<ACCS_GRAPHQL_URL>",
"useGETForQueries": true,
"operationHeaders": {
"Content-Type": "application/json",
"Magento-Environment-Id": "{context.headers['magento-environment-id']}",
"Magento-Website-Code": "{context.headers['magento-website-code']}",
"Magento-Store-View-Code": "{context.headers['magento-store-view-code']}",
"Magento-Store-Code": "{context.headers['magento-store-code']}",
"Magento-Customer-Group": "{context.headers['magento-customer-group']}",
"x-api-key": "{context.headers['x-api-key']}",
"Authorization": "{context.headers['Authorization']}"
}
}
},
"responseConfig": {
"headers": ["X-Magento-Cache-Id"]
}
},
{
"name": "Ratings",
"handler": {
"JsonSchema": {
"baseUrl": "https://ratings-api.apimesh-adobe-test.workers.dev",
"operations": [
{
"type": "Query",
"field": "ratings",
"path": "/",
"method": "GET",
"responseSample": "./sampleRatings.json"
}
]
}
}
}
],
"additionalTypeDefs": "type Rating { average: Int, total: Int } extend type SimpleProductView { rating: Rating }",
"additionalResolvers": ["./ratingsResolver.js"]
}
}