avoidwork/tenso

GraphQL support baked into a new 'default' collection would be useful

avoidwork opened this issue · 2 comments

Time saver generally.

Got a start on it... wiring it to correct context of resources should be interesting; maybe a route? Might need to keep it simple, e.g. res = {send: arg => cb(arg)} as a way to get the output, with a faux req decorating headers & sorting out a query string perhaps.

The callbacks would be the defer.resolve of a deferred() such that I could Promise.all() the callbacks, collect & generate the response.

Example query to reduce the /status response of the parking api at work:

'{
  status {
    building,
    floor,
    state
  }
}'

Just use Apollo.