patstrz
09/02/2017, 6:33 PMbody.context
but when the real subscription invokes a webtask I don’t have access to body.context
, specifically what I want to do is check body.context.graphcool.projectId
so that I know which project is calling the webtask ( I have a dev and production project), is this the expected behaviour? and if so how do I know what project is calling the function?patstrz
09/02/2017, 6:34 PM{
"data": {
"Score": {
"updatedFields": [
"updatedAt"
],
"node": {
"id": "cj73kpo2x00043k62dd28hxuj",
"value": 22051,
"scorecard": {
"id": "cj73kpo2y00053k62prudb5o9",
"total": 76023
}
}
}
},
"context": {
"request": {
"sourceIp": "test-ip",
"headers": {},
"httpMethod": "post"
},
"graphcool": {
"pat": "test-pat",
"projectId": "test-project-id",
"alias": "test-alias"
},
"environment": {},
"auth": {
"nodeId": "test-node-id",
"typeName": "test-type",
"token": "test-token"
},
"sessionCache": {}
}
}
patstrz
09/02/2017, 6:35 PM"body":{
"data":
{"Score":
{"updatedFields":null,
"node":
{"id":"cj73n0uz215r20135nkxpyank","value":55,
"scorecard":{"id":"cj5j2ur0nf5lt0111gpt45otg","total":0}
}
}
}
agartha
09/02/2017, 6:38 PMpatstrz
09/02/2017, 6:38 PMagartha
09/02/2017, 6:38 PMpatstrz
09/02/2017, 6:41 PMprojectid: devproject
but it does not seem to be setagartha
09/02/2017, 6:42 PMpatstrz
09/02/2017, 6:45 PMagartha
09/02/2017, 6:46 PMagartha
09/02/2017, 6:47 PMpatstrz
09/02/2017, 6:48 PMpatstrz
09/02/2017, 6:48 PMagartha
09/02/2017, 6:50 PMpatstrz
09/02/2017, 6:52 PMpatstrz
09/02/2017, 6:52 PM