Skip to content

tiensonqin/lacinia2datomic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lacinia2datomic

A Clojure library designed to convert lacinia schema to datomic schema.

Usage

(require '[lacinia2datomic.core :refer [lacinia->datomic]])

(def lacinia-schema {:enums {:role {:values ["ADMIN" "NORMAL"]}}
                     :objects {:user {:fields {:email {:type 'String}
                                               :name {:type 'String}
                                               :role {:type :role}}}}})

(clojure.pprint/pprint
 (lacinia->datomic lacinia-schema
                   {:exclude [:tokens]
                    :index {:user #{:name :role :email :phone :createdAt :updatedAt}}
                    :unique {:user #{:email :phone :facebookUserId}}}))

License

Copyright © 2017 Tienson Qin

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

Convert lacinia schema to datomic schema.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published