Skip to content

Commit

Permalink
basic implementation and tests with new datatypes + some API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Waeselynck committed Apr 17, 2018
1 parent 2301de6 commit 7b99a3a
Show file tree
Hide file tree
Showing 9 changed files with 1,908 additions and 601 deletions.
12 changes: 9 additions & 3 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
(defproject bandsquare/d2q "0.0.1-SNAPSHOT"
(defproject vvvvalvalval/d2q "0.0.1-SNAPSHOT"
:description "An expressive toolkit for building efficient GraphQL-like query servers"
:url "https://github.com/bandsquare/d2q"
:url "https://github.com/vvvvalvalval/d2q"
:license {:name "MIT License"
:url "https://opensource.org/licenses/MIT"}
:dependencies [[org.clojure/clojure "1.8.0"]
[manifold "0.1.6"]]
:profiles
{:dev
{:dependencies
[[midje "1.7.0"]]}})
[[midje "1.7.0"]
[vvvvalvalval/scope-capture "0.1.4"]
[vvvvalvalval/scope-capture-nrepl "0.2.0"]
[criterium "0.4.4"]
[com.taoensso/tufte "1.4.0"]
[vvvvalvalval/supdate "0.2.1"]]
:repl-options {:nrepl-middleware [sc.nrepl.middleware/wrap-letsc]}}})
407 changes: 325 additions & 82 deletions src/d2q/api.clj

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions src/d2q/datatypes.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
(ns d2q.datatypes)

;; ------------------------------------------------------------------------------
;; Query datatypes

(defrecord Query
[d2q-query-id
d2q-query-fcalls
d2q-rev-query-path])

(defrecord FieldCall
[d2q-fcall-field
;; NOTE maybe we need another index than d2q-fcall-key, e.g d2q-fcall-j which would be an integer
d2q-fcall-key
d2q-fcall-arg
d2q-fcall-subquery
;; NOTE this is a source path (Val, 05 Apr 2018) TODO check it's done correctly (Val, 05 Apr 2018)
d2q-fcall-rev-query-path])

;; ------------------------------------------------------------------------------
;; Resolvers datatypes

(defrecord ResultCell
[^int d2q-entcell-i
^int d2q-fcall-i
d2q-rescell-value])

(defrecord ResolverResult
[d2q-res-cells
d2q-errors])
Loading

0 comments on commit 7b99a3a

Please sign in to comment.