(get-all-pages getter results? valuesfn)
(get-all-pages getter results? valuesfn get-nextfn)
Convenience function for getting all of the results from a paged search.
getter: function that returns a single page, given a cursor string. results?: function that returns a boolean indicating whether the current page contains values. valuesfn: function to extract the values from a page. get-nextfn: function to get the cursor for the next page. Optional. Defaults to one that looks for the values in :data -> :search -> :pageInfo.
Returns a flattened, realised sequence with all of the result. Don't use this on an infinite or enormous sequence.
Convenience function for getting all of the results from a paged search. getter: function that returns a single page, given a cursor string. results?: function that returns a boolean indicating whether the current page contains values. valuesfn: function to extract the values from a page. get-nextfn: function to get the cursor for the next page. Optional. Defaults to one that looks for the values in :data -> :search -> :pageInfo. Returns a flattened, realised sequence with all of the result. Don't use this on an infinite or enormous sequence.
(get-graphql name)
Retrieve the GraphQL as a text blob
Retrieve the GraphQL as a text blob
(http-get access-token url opts)
Make a GET request to a url, with options
Make a GET request to a url, with options
(http-post url payload opts)
Make a POST request to a url with payload and request options.
Make a POST request to a url with payload and request options.
(iteration step!
&
{:keys [vf kf some? initk]
:or {vf identity kf identity some? some? initk nil}})
Taken from https://clojure.atlassian.net/browse/CLJ-2555. This function can just be removed when we start using 1.11 of Clojure.
creates a seqable/reducible given step!, a function of some (opaque continuation data) k
step! - fn of k/nil to (opaque) 'ret'
:some? - fn of ret -> truthy, indicating there is a value will not call vf/kf nor continue when false :vf - fn of ret -> v, the values produced by the iteration :kf - fn of ret -> next-k or nil (will not continue) :initk - the first value passed to step!
vf, kf default to identity, some? defaults to some?, initk defaults to nil
it is presumed that step! with non-initk is unreproducible/non-idempotent if step! with initk is unreproducible, it is on the consumer to not consume twice
Taken from https://clojure.atlassian.net/browse/CLJ-2555. This function can just be removed when we start using 1.11 of Clojure. creates a seqable/reducible given step!, a function of some (opaque continuation data) k step! - fn of k/nil to (opaque) 'ret' :some? - fn of ret -> truthy, indicating there is a value will not call vf/kf nor continue when false :vf - fn of ret -> v, the values produced by the iteration :kf - fn of ret -> next-k or nil (will not continue) :initk - the first value passed to step! vf, kf default to identity, some? defaults to some?, initk defaults to nil it is presumed that step! with non-initk is unreproducible/non-idempotent if step! with initk is unreproducible, it is on the consumer to not consume twice
(make-graphql-post access-token graphql variables)
Make a GraphQL request to Github using the provided query/mutation and variables. If there are any errors, throw a RuntimeException, with the message set to the first error and the rest of the response as the cause/additional information.
Make a GraphQL request to Github using the provided query/mutation and variables. If there are any errors, throw a RuntimeException, with the message set to the first error and the rest of the response as the cause/additional information.
(request-opts access-token)
Add the authorization header to the http request options.
Add the authorization header to the http request options.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close