Skip to content

Instantly share code, notes, and snippets.

View lagenorhynque's full-sized avatar
🐬
architecting & managing

Kent OHASHI lagenorhynque

🐬
architecting & managing
View GitHub Profile
@lagenorhynque
lagenorhynque / graphql-api-in-clojure.md
Last active November 11, 2022 07:03
GraphQL API in Clojure

GraphQL API in Clojure


(defprofile lagénorhynque
  :aliases      [カマイルカ🐬]
lagenorhynchus@lagenorhynque-mbp:code$ mkdir hy-playground
lagenorhynchus@lagenorhynque-mbp:code$ cd hy-playground/
lagenorhynchus@lagenorhynque-mbp:hy-playground$ pipenv install hy
Creating a virtualenv for this project…
Pipfile: /Users/lagenorhynchus/code/hy-playground/Pipfile
Using /usr/local/Cellar/pipenv/2018.11.26/libexec/bin/python3.7 (3.7.2) to create virtualenv…
⠇ Creating virtual environment...Already using interpreter /usr/local/Cellar/pipenv/2018.11.26/libexec/bin/python3.7
Using real prefix '/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7'
New python executable in /Users/lagenorhynchus/.local/share/virtualenvs/hy-playground-K-WGms8b/bin/python3.7
Also creating executable in /Users/lagenorhynchus/.local/share/virtualenvs/hy-playground-K-WGms8b/bin/python
@lagenorhynque
lagenorhynque / aqoursql_artists.png
Last active November 11, 2022 07:05
ClojureのLaciniaでGraphQL API開発してみた
aqoursql_artists.png
@lagenorhynque
lagenorhynque / introduction-to-pedestal.md
Last active November 11, 2022 07:10
Clojureサービス開発ライブラリPedestal入門

今年9月のShibuya.lisp lispmeetup #68で「Interceptors: Into the Core of Pedestal」と題してClojureのサービス/API開発ライブラリ"Pedestal"を簡単に紹介する発表をしました。

最近、Webアプリ開発の仕事でプロジェクトの基盤構築にDuct、API機能開発にPedestalという構成でClojureによるREST APIを開発していて、個人的にもなかなか便利だと感じています。

そこで今回はこのPedestalについて、ちょうど日本語情報も見当たらないので簡単にまとめてみます。

Pedestalとは

GitHubリポジトリのREADMEには

@lagenorhynque
lagenorhynque / users_test.clj
Last active November 26, 2018 11:53
lacinia-pedestal e2e testing
(t/deftest test-list-users
(with-system [sys (helper/test-system)]
(with-db-data [sys {:user db-data/user}]
(t/testing "ユーザの一覧が取得できる"
(t/testing "ユーザ名指定あり"
(let [{:keys [status body]}
(helper/http-post sys "/graphql"
(venia/graphql-query
{:venia/queries [[:users {:name "曜"}
[:id
@lagenorhynque
lagenorhynque / deps.edn
Created November 15, 2018 23:18
A simple Clojure script to generate Vue.js (TypeScript) component files.
{:deps {selmer {:mvn/version "1.12.3"}}
:paths ["scripts"]}
@lagenorhynque
lagenorhynque / duct-guide.md
Last active November 11, 2022 07:10
ClojureサーバサイドフレームワークDuctガイド

ClojureによるWeb開発のサーバサイドで注目度の高い(マイクロ)フレームワークとしてDuctがあります。

ちょうど1年前の2017年12月に私自身初めてDuctによる簡単なREST APIを試作してみて、その過程をAdvent Calendar記事にしたことがありました。

今回は主にClojure言語のことを知っていてWebアプリ開発に興味のある方向けに、英語も含めてドキュメントのとても少ないDuctというフレームワークがどのようなものなのか、技術的な詳細に踏み込んだ解説を試みます。

ちなみに、執筆時点で参照/動作確認した各種ライブラリのバージョンは、サンプルプロジェクト"hello-duct"のproject.cljの通りです(Duct最新安定版0.11.2のテンプレートのまま)。

Ductとは

@lagenorhynque
lagenorhynque / introduction-to-law.md
Last active November 11, 2022 07:10
法学入門

法学入門


カマイルカ🐬/laʒenɔʁɛ̃k/

(defprofile lagénorhynque
 :name "Kent OHASHI"
@lagenorhynque
lagenorhynque / interceptors-into-the-core-of-pedestal.md
Last active November 11, 2022 07:11
Interceptors: Into the Core of Pedestal

Interceptors

Into the Core of Pedestal


カマイルカ🐬/laʒenɔʁɛ̃k/

(defprofile lagénorhynque
@lagenorhynque
lagenorhynque / boost-your-productivity-with-clojure-repl.md
Last active November 11, 2022 07:11
Boost your productivity with Clojure REPL

Boost your productivity

with Clojure REPL


カマイルカ🐬/laʒenɔʁɛ̃k/

(defprofile lagénorhynque