Repository: wilkerlucio/pathom (clojure)

Issue:
env should contain full query/tx
My use case would be sending out the full query in case of a `::p/process-error` invocation.

Pull request description:
Closes #118

Patch:
diff --git a/src/com/wsscode/pathom/core.cljc b/src/com/wsscode/pathom/core.cljc
index 7ebcebad..ceba3847 100644
--- a/src/com/wsscode/pathom/core.cljc
+++ b/src/com/wsscode/pathom/core.cljc
@@ -978,7 +978,8 @@
            ::request-cache     (atom {})
            ::entity-key        ::entity
            ::entity-path-cache (atom {})
-           ::parent-query      tx}
+           ::parent-query      tx
+           ::root-query        tx}
           env
           {::plugin-actions (group-plugins-by-action plugins)
            ::plugins        plugins


Test patch:
diff --git a/test/com/wsscode/pathom/connect_test.cljc b/test/com/wsscode/pathom/connect_test.cljc
index d9202d65..a02c8f77 100644
--- a/test/com/wsscode/pathom/connect_test.cljc
+++ b/test/com/wsscode/pathom/connect_test.cljc
@@ -3207,6 +3207,19 @@
 
 #?(:clj
    (deftest test-parallel-parser-with-connect
+     (testing "using root-query"
+       (is (= (quick-parser {::pc/register [(pc/resolver 'base
+                                              {::pc/output [{:base [{:deep [:data]}]}]}
+                                              (fn [env _]
+                                                {:base {:deep {:data "value"}}}))
+
+                                            (pc/resolver 'root-query
+                                              {::pc/output [:root-query]}
+                                              (fn [{::p/keys [root-query]} _]
+                                                {:root-query root-query}))]}
+                '[{:base [{:deep [:root-query]}]}])
+              {:base {:deep {:root-query [{:base [{:deep [:root-query]}]}]}}})))
+
      (testing "parallel mutation join with environment override"
        (is (= (quick-parser {::pc/register [(pc/resolver 'token-value
                                               {::pc/output [:nada