A small server running an askVM to handle requests.
- git clone https://github.com/YonatanKra/askql-demo.git
- cd askql-demo
- yarn
- yarn dev
- Once the server is running, go to http://localhost:8080
- You will see a form with an initial query
- You can create a new query (see full documentation or code examples)
- The results will be printed in the Results section
ask { names }
ask { powers }
ask {
let arr = [];
for (let i = 0; i < names:length; i = i + 1) {
arr = arr:set(i, { name: names:at(i), power: powers:at(i)});
}
arr
}
ask {
names:find(fun(c, i) {
return powers:at(i):equals('Innocent')
})
}
ask {
fetch('https://swapi.dev/api/people'):at('results')
}
ask {
fetch('https://swapi.dev/api/people'):at('results'):map(fun(swCharacter) {
{
Name: swCharacter.name,
Gender: swCharacter.gender,
'Hair Color': swCharacter.hair_color
}
})
}