Parse a query document using a compiled schema.
Also provides functions that operate on the parsed query.
Parse a query document using a compiled schema. Also provides functions that operate on the parsed query.
(invariant? parsed-query)
Analyzes the parsed query and returns true if it contains no query variables or
query directives; an invariant query will be identical before and after
invoking prepare-with-query-variables
.
Analyzes the parsed query and returns true if it contains no query variables or query directives; an invariant query will be identical before and after invoking [[prepare-with-query-variables]].
(operations parsed-query)
Given a previously parsed query, this returns a map of two keys:
:type : The type of request, one of: :query, :mutation, or :subscription.
:operations : The names of the top-level operations, as a set of keywords.
Given a previously parsed query, this returns a map of two keys: :type : The type of request, one of: :query, :mutation, or :subscription. :operations : The names of the top-level operations, as a set of keywords.
(parse-query schema query-document)
(parse-query schema query-document operation-name)
(parse-query schema query-document operation-name timing-start)
Given a compiled schema and a query document, parses the query to an executable form as well as performing a number of validations.
When the request containing the query document provides an operation name, that is provided and the parsed query executes just that operation.
Given a compiled schema and a query document, parses the query to an executable form as well as performing a number of validations. When the request containing the query document provides an operation name, that is provided and the parsed query executes just that operation.
(prepare-with-query-variables parsed-query variables)
Given a parsed query data structure and a map of variables, update the query, calculating field arguments and applying @skip and @include directives.
Given a parsed query data structure and a map of variables, update the query, calculating field arguments and applying @skip and @include directives.
(summarize-query parsed-query)
Analyzes a parsed query, returning a summary string.
The summary superficially resembles a GraphQL query, but strips out aliases, directives, and field arguments. In addition, fragments (both inline and named) are collapsed into their containing selections.
This summary can act as a 'fingerprint' of a related set of queries and is typically used in query performance analysis.
Analyzes a parsed query, returning a summary string. The summary superficially resembles a GraphQL query, but strips out aliases, directives, and field arguments. In addition, fragments (both inline and named) are collapsed into their containing selections. This summary can act as a 'fingerprint' of a related set of queries and is typically used in query performance analysis.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close