Robust APIs with clojure.spec & GraphQL
Dom Kiva-Meyer, Lily Goh at Clojure/conj 2018
Wouldn’t you like to define and consume your entire API with clojure.spec?
Specifying an entire REST API is a manual and error-prone process, but specifying an entire GraphQL API can be automatic and fool-proof. Though GraphQL’s type system is limited, we can use clojure.spec to augment GraphQL with capabilities beyond what the GraphQL specification is capable of expressing, and we can do this without losing robustness. When using clojure.spec with GraphQL, API specs can be easily shared between the backend and frontend and used for validation and coercion.
Project: https://github.com/paren-com/serene
Specifying an entire REST API is a manual and error-prone process, but specifying an entire GraphQL API can be automatic and fool-proof. Though GraphQL’s type system is limited, we can use clojure.spec to augment GraphQL with capabilities beyond what the GraphQL specification is capable of expressing, and we can do this without losing robustness. When using clojure.spec with GraphQL, API specs can be easily shared between the backend and frontend and used for validation and coercion.
Project: https://github.com/paren-com/serene