문서 보기역링크PDF로 내보내기맨 위로 이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. # default-service <code clojure> (defn default-service "Returns a default Pedestal service map, with subscriptions and GraphiQL enabled. The defaults put the GraphQL API at `/api` and the GraphiQL IDE at `/ide` (and subscriptions endpoint at `/ws`). Unlike earlier versions of lacinia-pedestal, only POST is supported, and the content type must be `application/json`. compiled-schema is either the compiled schema itself, or a function returning the compiled schema. options is a map combining options needed by [[graphiql-ide-route]], [[default-interceptors]], [[enable-subscriptions]], and [[listener-fn-factory]]. It may also contain keys :app-context and :port (which defaults to 8888). You can also define an explicit :host address to your application. Useful when running inside Docker. This is useful for initial development and exploration, but applications with any more sophisticated needs should construct their service map directly." [compiled-schema options] (let [{:keys [api-path ide-path asset-path app-context port host] :or {api-path default-api-path ide-path "/ide" asset-path default-asset-path port 8888 host default-host-address}} options interceptors (default-interceptors compiled-schema app-context options) routes (into #{[api-path :post interceptors :route-name ::graphql-api] [ide-path :get (graphiql-ide-handler options) :route-name ::graphiql-ide]} (graphiql-asset-routes asset-path))] (-> {:env :dev ::http/routes routes ::http/port port ::http/host host ::http/type :jetty ::http/join? false} enable-graphiql (enable-subscriptions compiled-schema options)))) </code> open/default-service.txt 마지막으로 수정됨: 2022/06/15 12:04저자 127.0.0.1