Opinions on GraphQL and other schema/query languages? Lassi Kortela (28 Jun 2019 14:35 UTC)
Re: Opinions on GraphQL and other schema/query languages? Lassi Kortela (01 Jul 2019 15:33 UTC)
Re: Opinions on GraphQL and other schema/query languages? Lassi Kortela (04 Jul 2019 12:52 UTC)
(missing)
Re: Opinions on GraphQL and other schema/query languages? Arthur A. Gleckler (04 Jul 2019 15:39 UTC)
Re: Opinions on GraphQL and other schema/query languages? Lassi Kortela (04 Jul 2019 15:49 UTC)

Re: Opinions on GraphQL and other schema/query languages? Lassi Kortela 04 Jul 2019 12:52 UTC

Just started hacking on an experimental GraphQL server in JavaScript
that runs on Node.js using the Express web server. I'm using the
official "graphql" library from NPM and followed a tutorial explaining
it. This combination is probably the best new tech I've seen all summer.
Simply having a great time drafting things and the GraphQL queries are
so natural to write (the NPM graphql library includes a web REPL with
auto-completion and everything, so experimentation is extremely easy).
This definitely feels like the best approach for the API IMHO - it's as
fun to use in practice as it is a solid approach in theory.

Express also makes it really easy to put a static file server aside the
GraphQL server (e.g. <https://api.schemers.org/static/> would serve
static files and <https://api.schemers.org/graphql/> would serve the
GraphQL endpoint). GraphQL queries can return URLs that point to the
static files. If another query language is wanted in the future in
addition to GraphQL, it's no problem to add another endpoint like
<https://api.schemers.org/cool-new-query-language/>.

GraphQL solves API versioning quite neatly so it's no longer necessary
to have a version number in the URL like
<https://api.schemers.org/v1/whatever>. The filenames under
<https://api.schemers.org/static/> should have some kind of version
numbering scheme as part of the filenames.

Just started exploring BiwaScheme (a Scheme implementation that
translates to JavaScript with official support for Node.js). I still
think the alternative S-expression syntax for GraphQL would be cool and
generally useful so we could work on that. For getting standard GraphQL
supported, it would be easiest by far to use Node.js and Express,
writing a Biwa wrapper for the things we need. We could also use Kawa or
Bigloo on JVM, but the Java GraphQL and web libraries are not as easy to
use as the Node.js equivalents.

Thoughts?