Releases: metosin/oksa
Releases · metosin/oksa
1.1.0 (2024-08-04)
- Add generative tests #12 a7d0214
- Restrict fragment-spread map to be required #13
- BREAKING CHANGE: Restrict values inside ListValue and ObjectValue #14
- Add missing :min to selection set refs #15
- Add support for persistent hash map formatting #16
- Fixes parser to restrict fragment spread & subsequent selection set #18
- Fixes ClojureScript -name redef warning #20
Full Changelog: 1.0.0...1.1.0
1.0.0
1.0.0 (2024-05-24)
- Adds support for name transformers #10
- You can provide a custom function to transform names, fields, enums,
directives, and types. See README for
examples. - With this change, both the data DSL and API now uses the same unparser
implementation under the hood.
- You can provide a custom function to transform names, fields, enums,
- Fixes parser bug with sequential selection sets #9
- Adds babashka support #11
Name transformation
Supports top-level definitions and local overrides for transformers.
; clj -Sdeps '{:deps {fi.metosin/oksa {:mvn/version "1.0.0"} camel-snake-kebab/camel-snake-kebab {:mvn/version "0.4.3"}}}'
(require '[oksa.core :as o])
(require '[camel-snake-kebab.core :as csk])
(o/gql* {:oksa/name-fn csk/->camelCase
:oksa/directive-fn csk/->snake_case
:oksa/enum-fn csk/->SCREAMING_SNAKE_CASE
:oksa/field-fn csk/->Camel_Snake_Case
:oksa/type-fn csk/->PascalCase}
[[:foo-bar {:alias :bar-foo
:oksa/name-fn csk/->SCREAMING_SNAKE_CASE
:directives [:foo-bar]
:arguments {:foo-arg :bar-value}}
[:foo-bar]]
:naked-foo-bar
[:...
[:foo-bar]]
[:... {:on :foo-bar-fragment
:directives [:foo-bar]}
[:foo-bar]]])
; => "{BAR_FOO:Foo_Bar(FOO_ARG:BAR_VALUE)@foo_bar{Foo_Bar} Naked_Foo_Bar ...{Foo_Bar} ...on fooBarFragment@foo_bar{Foo_Bar}}"
0.1.0
Changelog:
- Adds
oksa.core/explain
as a convenience function formalli.core/explain
- Fixes default value formatting #6
- Introduces
oksa.alpha.api
for programmatic API access
#7- Restricts
FragmentDefinition
andOperationDefinition
to have just
single SelectionSet as per spec - Fixes
TypeName
to also support string-typed name
- Restricts
0.0.1
Hello world!
Oksa allows you generate GraphQL queries using Clojure data structures. This is the initial release.