long, project announcement 

: I've finally completed an initial version of dlayer, my graph query library; it's kind of like GraphQL, but without the Facebook, without the weird DSL, and without the weird monolithic "design your whole API at once" design.

Instead, it's an extensible, modular design; an API is composed at runtime of one or more modules, which may or may not be aware of each other's existence, and extend each other's types with extra attributes as well!

This makes it much more useful for collaborative projects where different people might design different extensions for a (semi-)standardized API structure, as well as organic development, rather than GraphQL's assumption that you have one "team" that "designs the API" - which I'm sure works great in a startup, but *sucks* for community projects.

It shares the same useful property as GraphQL does, however; it lets you very easily assemble a coherent API out of many different, inconsistent data sources, regardless of whether any HTTP is involved. (There's currently not even any HTTP anything!)

The current implementation is in JS, but the design (and extensibility method) are simple enough that I see no reason it couldn't be ported to other languages!

Here's a rough example of how it works, with some dummy "modules" and data: gist.github.com/joepie91/a01a5

I need to sleep now, but I'll post a link to the code and some initial documentation tomorrow, probably. Let me know if you're interested in testing this out though :)

Follow

project update, dlayer 

Slightly delayed, but I've pushed the code to its proper repo now :) git.cryto.net/joepie91/dlayer

It's also on npm: npmjs.com/package/dlayer -- but beware, there are no real docs yet, this is still a work in progress. API is not guaranteed stable yet, though there *is* an example in the misc folder in the repo.

Probably don't use this yet unless you're okay with living on the bleeding edge!

· · Web · 1 · 0 · 0

project update, dlayer 

An early example of what a dlayer module in a real-world project might look like: gist.github.com/joepie91/caee8

Sign in to participate in the conversation
Pixietown

Small server part of the pixie.town infrastructure. Registration is closed.