(generator schema & [opts])
Given a lacinia schema returns a function which takes an object key as an argument and returns a generator for that object, e.g.
(let [g (generator my-lacinia-schema)] (gen/sample (g :my-object) 10))
Options:
depth A map of object keys to the depth they should recurse to in cyclical graphs e.g. {:parent 1 :child 2}
width A map of object keys to the maximum number of items that should be present in lists of that object e.g. {:listed-object 3}
scalars A map of custom scalar types to the generators to be used for them. e.g. {:DateTime (gen/...)}
Given a lacinia schema returns a function which takes an object key as an argument and returns a generator for that object, e.g. (let [g (generator my-lacinia-schema)] (gen/sample (g :my-object) 10)) Options: - depth A map of object keys to the depth they should recurse to in cyclical graphs e.g. {:parent 1 :child 2} - width A map of object keys to the maximum number of items that should be present in lists of that object e.g. {:listed-object 3} - scalars A map of custom scalar types to the generators to be used for them. e.g. {:DateTime (gen/...)}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close