Skip to content
This repository was archived by the owner on Feb 11, 2020. It is now read-only.

Description of a TransformObject

Søren Vibjerg edited this page Jan 29, 2016 · 3 revisions

Input

The input of a transform is always the name of the event and a query object. The query object is specified as properties, that can be required or optional.

Output

The output object should always look like:

{
  data: {},
  info: {},
  errors: {}
}

data

The data object is defined by the transform, and documented though ...

  • swagger
  • a Datamodel defined in code
  • description

If some kind of datamodel is defined, the return object can be validated

Errorhandling

Errors should be caught and logged, and a useful message sent through the API.

Logging

The transform should log

  • all errors
  • all requests
  • all responses (is this too much?)

Open Questions

  • how to validate input and output

Possible Solutions

  • GraphQl
  • Schema-js

Clone this wiki locally