A GraphQL-like data access layer
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Sven Slootweg cbb3bfcec6 Add module context access escape hatch 5 months ago
misc Add async type factory support, and InvalidObject support 10 months ago
.gitignore Initial commit 11 months ago
README.md Initial commit 11 months ago
cursor.js Initial commit 11 months ago
deep-merge-and-map.js Ensure that methods in a module's root schema also receive a module-bound context 11 months ago
docs.md Initial commit 11 months ago
index.js Add module context access escape hatch 5 months ago
invalid-object.js Add async type factory support, and InvalidObject support 10 months ago
load-modules.js Add module context access escape hatch 5 months ago
notes.txt Initial commit 11 months ago
package.json 0.2.0 10 months ago
test.js Initial commit 11 months ago
yarn.lock Initial commit 11 months ago

README.md

dlayer

This library (and its documentation) is still a work-in-progress!

dlayer is a GraphQL-like data access layer. It lets you combine data from multiple sources into a single coherent API - and it's designed for application-internal use first and foremost, with network accessibility being an optional add-on.

dlayer differs from GraphQL in a number of important ways:

  • dlayer supports recursive queries without needing schema hacks; both bounded and unbounded.
  • dlayer is modular by default; a dlayer API can be composed of many independent 'modules' that can reference and extend each other when available. This allows for eg. constructing plugin systems, like in sysquery, as well as making it easier to loosely couple your API definition.
  • dlayer does not use a separate schema; the schema is implicitly defined by what the API returns. This essentially makes it dynamically typed; however, trying to access a non-existent property of the schema is an error.