Some helper functions to use JSONAPI in Hapi