loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.8245573387535974","path":"index.js","file":{"path":"index.js","content":{"asEncoding":{"base64":"Y29uc3QgcmVxdWVzdCA9IHJlcXVpcmUoJ3JlcXVlc3QnKTsKCnZhciByZXEgPSB7CiAgdXJsOiAnaHR0cHM6Ly9hcGkuZGlnaXRyYW5zaXQuZmkvcm91dGluZy92MS9yb3V0ZXJzL2hzbC9pbmRleC9ncmFwaHFsJywKICBtZXRob2Q6ICdQT1NUJywKICBoZWFkZXJzOiB7ICJDb250ZW50LVR5cGUiOiAiYXBwbGljYXRpb24vanNvbiIgfSwKICBib2R5OiB7ICJxdWVyeSI6IGB7CiAgICBzdG9wKGlkOiBcIkhTTDoxMDQwMTI5XCIpIHsKICAgICAgbmFtZQogICAgICBsYXQKICAgICAgbG9uCiAgICAgIHdoZWVsY2hhaXJCb2FyZGluZwogICAgfQogIH1gIH0sCiAganNvbjogdHJ1ZQp9OwoKcmVxdWVzdChyZXEsIGZ1bmN0aW9uIChlcnJvciwgcmVzcG9uc2UsIGJvZHkpIHsKICBpZiAoIWVycm9yICYmIHJlc3BvbnNlLnN0YXR1c0NvZGUgPT0gMjAwKSB7CiAgICBjb25zb2xlLmxvZyhKU09OLnN0cmluZ2lmeShib2R5LCBudWxsLCA0KSk7IAogIH0KfSk7"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const request = require('request');

var req = {
  url: 'https://api.digitransit.fi/routing/v1/routers/hsl/index/graphql',
  method: 'POST',
  headers: { "Content-Type": "application/json" },
  body: { "query": `{
    stop(id: \"HSL:1040129\") {
      name
      lat
      lon
      wheelchairBoarding
    }
  }` },
  json: true
};

request(req, function (error, response, body) {
  if (!error && response.statusCode == 200) {
    console.log(JSON.stringify(body, null, 4)); 
  }
});
node v10.16.0