Skip to content
New issue

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

resolver helper들에서 return-camel-case를 언제나 하던 코드 삭제 #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions src/gosura/helpers/resolver.clj
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@
(-> (superlifter-api/enqueue! db-key (superfetcher superfetch-id superfetch-arguments))
(prom/then (fn [rows]
(-> (first rows)
(relay/build-node node-type post-process-row)
transform-keys->camelCaseKeyword)))))))
(relay/build-node node-type post-process-row))))))))

(defn resolve-by-fk
"Lacinia 리졸버로서 config 설정에 따라 단건 조회 쿼리를 처리한다.
Expand Down Expand Up @@ -210,8 +209,7 @@
(with-superlifter (:superlifter context)
(-> (superlifter-api/enqueue! db-key (superfetcher superfetch-id superfetch-arguments))
(prom/then (fn [rows] (-> (first rows)
(relay/build-node node-type post-process-row)
transform-keys->camelCaseKeyword)))))))
(relay/build-node node-type post-process-row))))))))

(defn resolve-connection
"Lacinia 리졸버로서 config 설정에 따라 목록 조회 쿼리를 처리한다.
Expand Down Expand Up @@ -250,8 +248,7 @@
rows (table-fetcher db filter-options page-options)]
(->> rows
(map #(relay/build-node % node-type post-process-row))
(relay/build-connection order-by page-direction page-size cursor-id)
transform-keys->camelCaseKeyword)))
(relay/build-connection order-by page-direction page-size cursor-id))))

;; FIXME: N+1 쿼리임
(defn resolve-connection-by-pk-list
Expand Down Expand Up @@ -289,8 +286,7 @@
rows (table-fetcher db filter-options page-options)]
(->> rows
(map #(relay/build-node % node-type post-process-row))
(relay/build-connection order-by page-direction page-size cursor-id)
transform-keys->camelCaseKeyword)))
(relay/build-connection order-by page-direction page-size cursor-id))))

(defn resolve-connection-by-fk
"Lacinia 리졸버로서 config 설정에 따라 목록 조회 쿼리를 처리한다.
Expand Down Expand Up @@ -328,8 +324,7 @@
(prom/then (fn [rows]
(->> rows
(map #(relay/build-node % node-type post-process-row))
(relay/build-connection order-by page-direction page-size cursor-id)
transform-keys->camelCaseKeyword)))))))
(relay/build-connection order-by page-direction page-size cursor-id))))))))

; TODO 다른 mutation helper 함수와 통합
(defn pack-mutation-result
Expand Down