File tree 2 files changed +14
-3
lines changed
2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Change Log
2
2
3
+ ## [ 2.0.14]
4
+ - Add ` pc/mutation-data ` helper
5
+
3
6
## [ 2.0.13]
4
7
- BREAKING: ` ::pc/wrap-resolver ` is now ` ::pc/wrap-resolve `
5
8
Original file line number Diff line number Diff line change 39
39
40
40
(defn resolver-data
41
41
" Get resolver map information in env from the resolver sym."
42
- [env sym]
43
- (let [idx (cond-> env
44
- (contains? env ::indexes )
42
+ [env-or-indexes sym]
43
+ (let [idx (cond-> env-or-indexes
44
+ (contains? env-or-indexes ::indexes )
45
45
::indexes )]
46
46
(get-in idx [::index-resolvers sym])))
47
47
48
+ (defn mutation-data
49
+ " Get mutation map information in env from the resolver sym."
50
+ [env-or-indexes sym]
51
+ (let [idx (cond-> env-or-indexes
52
+ (contains? env-or-indexes ::indexes )
53
+ ::indexes )]
54
+ (get-in idx [::mutations sym])))
55
+
48
56
(defn- flat-query [query]
49
57
(->> query p/query->ast :children (mapv :key )))
50
58
You can’t perform that action at this time.
0 commit comments