forked from bandsquare/d2q
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
basic implementation and tests with new datatypes + some API docs
- Loading branch information
Valentin Waeselynck
committed
Apr 17, 2018
1 parent
2301de6
commit 7b99a3a
Showing
9 changed files
with
1,908 additions
and
601 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]}}}) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]) |
Oops, something went wrong.