Skip to content

Ultrastructure GraphQL API

Constantine edited this page Sep 15, 2015 · 4 revisions

This page describes the Ultrastructure GraphQL API endpoint.

What is GraphQL?

One of the great things about GraphQL is that it is from Facebook. The great thing about that is they have lots of people who know how to write and talk about GraphQL. It is well worth your while to browse through teh Google and see what you can find. There's some good stuff out there.

How Is GraphQL Integrated Into Ultrastructure?

That's a very good question, I'm glad you asked.

Workspaces As GraphQL Schema Namespaces

The GraphQL resource endpoint (/graphql/workspace/<workspace uuid/uri>) is partitioned by workspace. Ultrastructure workspaces provide a conceptual handle that defines a GraphQL Schema of Types derived from the workspace.

Phantasms As GraphQL Schema Types

In Ultrastructure, one does not define a GraphQL schema. Rather than the GraphQL schema is generated by the Phantasms defined in that workspace. GraphQL as defined by Facebook provides a flat query namespace. By naturally partitioning the GraphQL query endpoint by workspace, we can provide a nicely sophisticated mechanism for partitioning the Types and providing some measure to prevent namespace explosion.

The Phantasms defined in a workspace are represented by generated GraphQL Types. These Types define a set of top level query and mutation types that clients may issue GraphQL queries and mutations to.

Phantasm

Clone this wiki locally