Skip to content

workframers/stillsuit

Repository files navigation

stillsuit

CircleCI

stillsuit is a library that provides some facilities for accessing datomic databases from the lacinia GraphQL library.

It is designed to be used as a standalone library, but the catchpocket project can also be used in order to extract GraphQL schema information from an existing datomic database.

For an example of using it, see the stillsuit-sample project.

Note that because stillsuit relies heavily on the datomic Entity API, it only works with "On-Prem" datomic installations using the Peer libraries. In particular, it is not currently usable with Datomic Cloud.

Features

The basic idea behind stillsuit is that you define a few top-level queries that return datomic entities or lists of entities, set up your schema to tell lacinia which :db.type/ref attributes point at which GraphQL types, and stillsuit handles graph traversal and field lookup for you.

Installation

Add this to project.clj, build.boot, or deps.edn:

[com.workframe/stillsuit "0.15.0"]

Note that stillsuit assumes that you have the datomic peer libraries in your local maven repository.

Documentation

The docs are sparse, but you can find a user manual and API documentation online.

There is a slide deck here discussion stillsuit and catchpocket.

Usage

stillsuit takes as input a lacinia schema definition and a configuration map. It will decorate the schema to add a few resolvers, queries, scalar transformers, etc, and then optionally compile it for you.

Using with catchpocket

stillsuit is usable with a manually-written schema file, but you can also use the catchpocket project to scan your datomic database and automatically generate large parts of a schema file for you.

In the ideal scenario, catchpocket can generate all of your object definitions for you, leaving only the top-level queries for you to write.

Logging

stillsuit uses clojure.tools.logging over slf4j for logging (this is also what the datomic libraries use).

Why "stillsuit"?

In Frank Herbert's Dune novels, a stillsuit is used to retain precious water in the harsh desert environment of Arrakis.

Contributing

Bug reports, feature ideas, and PRs are welcome! However, we might not be a little slow to release merged PRs at times, depending on our own release cycles.

We are especially looking for cases where stillsuit's assumptions about a data-model are not correct.

License

Copyright © 2018 Workframe, Inc.

Distributed under the Apache License, Version 2.0.

About

Clojure library for lacinia/datomic interop

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •