Protocol responsible for query arguments' formatting to string. Has separate implementations for general data types in cljs and clj.
Protocol responsible for query arguments' formatting to string. Has separate implementations for general data types in cljs and clj.
(arg->str arg)
(arguments->str args)
Given a map of query arguments, formats them and concatenates to string.
E.g. (arguments->str {:id 1 :type "human"}) => id:1,type:"human"
Given a map of query arguments, formats them and concatenates to string. E.g. (arguments->str {:id 1 :type "human"}) => id:1,type:"human"
(fields->str fields)
Given a spec conformed vector of query fields (and possibly nested fields), concatenates them to string, keeping nested structures intact.
Given a spec conformed vector of query fields (and possibly nested fields), concatenates them to string, keeping nested structures intact.
(fragment->str fragment)
Given a fragment map, formats it and concatenates to string,
Given a fragment map, formats it and concatenates to string,
(graphql-query data & [{:keys [:kw->gql-name]}])
Formats clojure data structure to valid graphql query string.
Formats clojure data structure to valid graphql query string.
(include-fields? fields)
Include fields if fields is not empty or is a keyword. fields could be nil or empty for operations that return a scalar.
Include fields if fields is not empty or is a keyword. fields could be nil or empty for operations that return a scalar.
(meta-field->str meta-field)
Converts namespaced meta field keyword to graphql format, e.g :meta/typename -> __typename
Converts namespaced meta field keyword to graphql format, e.g :meta/typename -> __typename
(sequential->str arg)
Given something that is sequential format it to be like a JSON array.
Given something that is sequential format it to be like a JSON array.
(variables->str variables)
Given a vector of variable maps, formats them and concatenates to string.
E.g. (variables->str [{:variable/name "id" :variable/type :Int}]) => "$id: Int"
Given a vector of variable maps, formats them and concatenates to string. E.g. (variables->str [{:variable/name "id" :variable/type :Int}]) => "$id: Int"
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close