GraphQL beyond the Web

GraphQL is (from their site):

DECLARATIVE
Query responses are decided by the client rather than the server. A GraphQL query returns exactly what a client asks for and no more.
COMPOSITIONAL
A GraphQL query itself is a hierarchical set of fields. The query is shaped just like the data it returns. It is a natural way for product engineers to describe data requirements.
STRONG-TYPED
A GraphQL query can be ensured to be valid within a GraphQL type system at development time allowing the server to make guarantees about the response. This makes it easier to build high-quality client tools.

The GraphQL website has a lot of additional information, documentation, and some initial implementations.

I'm going to assume that you're at least roughly familiar with it, but as a quick example, this query:

{
  hero {
    id
    name
    friends {
      id
      name
    }
  }
}

This query could return something like:

{
  "data": {
    "hero": {
      "id": "2001",
      "name": "R2-D2",
      "friends": [
        {
          "id": "1000",
          "name": "Luke Skywalker"
        },
        {
          "id": "1002",
          "name": "Han Solo"
        },
        {
          "id": "1003",
          "name": "Leia Organa"
        }
      ]
    }
  }
}

A simpler query over the same data that is parameterized might look like:

query FetchSomeIDQuery($someId: String!) {
  human(id: $someId) {
    name
  }
}

And a response from that, given a value of 1000 for ...

read more »

Finding a User Interface library

I'm building something for building developer tools. That's pretty vague, but I'd like to keep it that way for now. To do this, I wanted to use an existing user interface library. Unfortunately, it seems like it is always impossible to find what I want. I apparently want too much.

My Requirements

So, what am I looking for? These are just my own personal desires and I certainly don't expect that everyone will agree with them.

React
I'm planning to use React in my rendering layer, so it would be nice if the user interface framework that I use has solid support for React. This seems like a no-brainer. That said, there is another layer in my architecture which describes user interfaces and that is what gets lowered or converted to the actual widget definitions. In theory, this means that multiple view layers could exist (perhaps even using something like React Native). But for the start, I need solid React support.
TypeScript
Much like my desire for React support, I am writing my code in TypeScript. That doesn't mean that the UI has to be in TypeScript, but it would make it more convenient ...
read more »

Querying OS Information

For a project that I'm working on, I would like to be able to retrieve information from the OS about a variety of things:

  • File system
  • Current processes running
  • Process memory maps
  • Open file handles in a process
  • File attributes
  • File type, mime type
  • ... and a lot more!

Some of these are very easy and are just a set of calls to POSIX functions. Others are highly dependent on the underlying platform.

I want to be able to access this data from an application that is either running natively or from within node.js when using Electron. I want it on a minimum of Mac OS X, Linux, FreeBSD and Windows. Support for other platforms such as NetBSD would be nice.

I don't want this to be very large. The overall code required is likely to be fairly small. Hopefully, a large number of dependencies would not be brought in by using a library that provides this information.

I want the data in JSON-LD format. This is JSON, but with some additional fields, like @type, that help my application present the data correctly. It would be nice if there were a way to subset the data such that ...

read more »