Introduction

About

A config driven NodeJS framework implementing json:api and GraphQL. You define the resources, it provides the api.

Motivation / Justification / Rationale

This framework solves the challenges of json:api and GraphQL without coupling us to any one ORM solution. Every other module out there is either tightly coupled to a database implementation, tracking an old version of the json:api spec, or is merely a helper library for a small feature. If you're building an API and your use case only involves reading and writing to a data store... well count yourself lucky. For everyone else, this framework provides the flexibility to provide a complex API without being confined to any one technology.

A config driven approach to building an API enables:

  • Enforced json:api responses
  • Automatic GraphQL schema generation
  • Request validation
  • Payload validation
  • Automatic documentation generation
  • Automatic inclusions
  • Automatic routing
  • Automatic handling of relationships

Ultimately, the only things you as a user of this framework need to care about are:

  • What are my resources called
  • What properties do my resources have
  • For each resource, implement a handler for:
    • deleteing a resource
    • searching for many resources
    • finding a specific resource
    • createing a resource
    • updateing a specific resource

We've created handlers to automatically map our config over to database solutions help people get off the ground:

We've also written a library to ease the consumption of a json:api compliant service, if GraphQL isn't your thing: