We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
::pc/mutation-data
In resolver context, pathom provide a pc/resolver-data that contains all "metadata" from resolver
resolver
pc/resolver-data
This feature isn't present in mutation.
(let [register [(pc/mutation `mutation {::pc/output [::mutation]} (fn [env params] {::mutation (-> env ::pc/mutation-data)})) (pc/resolver `resolver {::pc/output [::resolver]} (fn [env params] {::resolver (-> env ::pc/resolver-data)}))] parser (p/parser {::p/plugins [(pc/connect-plugin {::pc/register register})] ::p/mutate pc/mutate}) env {::p/reader [p/map-reader pc/reader2 pc/open-ident-reader]}] (parser env `[{(mutation {}) [::resolver ::mutation]}])) => {user/mutation {:user/resolver {:com.wsscode.pathom.connect/sym user/resolver, :com.wsscode.pathom.connect/input #{}, :com.wsscode.pathom.connect/resolve #object[user$eval21712$fn__21715 0x700e1383 "user$eval21712$fn__21715@700e1383"], :com.wsscode.pathom.connect/output [:user/resolver]}, ;; expected: {::pc/sym user/mutation ....} ;; actual: :user/mutation nil}}
The text was updated successfully, but these errors were encountered:
in here https://github.com/wilkerlucio/pathom/blob/master/src/com/wsscode/pathom/connect.cljc#L1508 and https://github.com/wilkerlucio/pathom/blob/master/src/com/wsscode/pathom/connect.cljc#L1530
(if-let [{::keys [sym] :as mutation-data} (get-in indexes [::index-mutations sym'])] (let [env (-> env (assoc-in [:ast :key] sym) (assoc ::pc/mutation-data mutation-data))]
Consider mutation-data helper function (line 124 ATM)
mutation-data
test
(is (every? number? (for [[mutate parser-gen] [[pc/mutate p/parser] [pc/mutate-async p/parallel-parser]]] (let [register [(pc/mutation `mutation {::my-var 42} (fn [env params] {::mutation (-> env ::pc/mutation-data))}))] parser (parser-gen {::p/plugins [(pc/connect-plugin {::pc/register register})] ::p/mutate mutate})] (-> (parser {} `[(mutation)]) (wasync/<!!maybe) (get-in [`mutation ::mutation ::my-var]))))))
Sorry, something went wrong.
No branches or pull requests
In
resolver
context, pathom provide apc/resolver-data
that contains all "metadata" from resolverThis feature isn't present in mutation.
The text was updated successfully, but these errors were encountered: