copying over mini client from jsonapi-client