Skip to content

Clojure wrapper for processing Clojure vectors into Dgraph strings

License

Notifications You must be signed in to change notification settings

sashkachan/clj-dgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clj-dgraph

Clojure library to turn Clojure vectors and maps into Dgraph query strings

Clojars Project

Usage

(require 'clj-dgraph.core)

(def query
  [:query
   [:director.name
    [{:func :me, :args {:id 1}}
     [{:func :allofterms :args [:name "quoted-name"]} :title2 :title3 ]]]])

(clj-dgraph.core/vec->query query)

Will return (non-pretty printed):

query{
    director.name
    me(id:1) {
        allofterms(name, "quoted-name") {
            title2
            title3
        }
    }
}

TODO

  • Support schema definitions
  • Add some syntactic sugar for queries

License

Copyright © 2017 Aleksandr Guljajev

Distributed under the MIT License.

About

Clojure wrapper for processing Clojure vectors into Dgraph strings

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published