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.
- Works on top of existing lacinia code and schemas
- Defines scalar transformers for datomic primitive types
- Supports GraphQL Enums
for datomic attributes defined as keywords or
- Defines lacinia field resolver factories
to resolve datomic
- Defines a default field resolver
that translates between datomic
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.
Add this to project.clj, build.boot, or deps.edn:
Note that stillsuit assumes that you have the datomic peer libraries in your local maven repository.
There is a slide deck here discussion stillsuit and catchpocket.
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.
clojure.tools.logging over slf4j for logging (this is
also what the datomic libraries use).
In Frank Herbert's Dune novels, a stillsuit is used to retain precious water in the harsh desert environment of Arrakis.
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.
Copyright © 2018 Workframe, Inc.
Distributed under the Apache License, Version 2.0.