(async-pick-resolver
{:com.wsscode.pathom.connect/keys [indexes dependency-track] :as env})
(async-reader {:com.wsscode.pathom.connect/keys [indexes]
:as env
:com.wsscode.pathom.core/keys [processing-sequence]})
(batch-resolver single-fn multi-fn)
Return a resolver that will dispatch to single-fn when the input is a single value, and multi-fn when multiple inputs are provided (on batch cases).
Return a resolver that will dispatch to single-fn when the input is a single value, and multi-fn when multiple inputs are provided (on batch cases).
(call-resolver {:com.wsscode.pathom.connect/keys [pool-chan] :as env} entity)
(call-resolver* {:com.wsscode.pathom.connect/keys [resolver-dispatch
resolver-weights]
:or {resolver-dispatch default-resolver-dispatch}
:as env}
entity)
(compute-paths index-oir keys bad-keys attr)
This function will return a set of possible paths given a set of available keys to reach some attribute. You also send a set of bad keys, bad keys mean information you cannot use (maybe they already got an error, or you known will not be available).
This function will return a set of possible paths given a set of available keys to reach some attribute. You also send a set of bad keys, bad keys mean information you cannot use (maybe they already got an error, or you known will not be available).
(data->shape data)
Helper function to transform a data into an output shape.
Helper function to transform a data into an output shape.
(decrease-path-costs {:com.wsscode.pathom.connect/keys
[resolver-weights resolver-weight-decrease-amount]
:or {resolver-weight-decrease-amount 1}}
plan)
(default-resolver-dispatch {{:com.wsscode.pathom.connect/keys [sym]
:as resolver}
:com.wsscode.pathom.connect/resolver-data
:as env}
entity)
(discover-attrs {:com.wsscode.pathom.connect/keys [index-io cache] :as index}
ctx)
(ident-reader env)
Reader for idents on connect, this reader will make a join to the ident making the context have that ident key and value. For example the ident [:user/id 123] will make a join to a context {:user/id 123}. This reader will continue if connect doesn't have a path to respond to that ident.
This reader also supports params to add more context besides the entity value. To use
that send the :pathom/context
param with the join, as in:
[{([:user/id 123] {:pathom/context {:user/foo "bar"}}) [:user/name]}]
In the previous case, the context will be the merge between the identity and the context, {:user/id 123 :user/foo "bar"} in this case.
Reader for idents on connect, this reader will make a join to the ident making the context have that ident key and value. For example the ident [:user/id 123] will make a join to a context {:user/id 123}. This reader will continue if connect doesn't have a path to respond to that ident. This reader also supports params to add more context besides the entity value. To use that send the `:pathom/context` param with the join, as in: [{([:user/id 123] {:pathom/context {:user/foo "bar"}}) [:user/name]}] In the previous case, the context will be the merge between the identity and the context, {:user/id 123 :user/foo "bar"} in this case.
This is an extensible gateway so you can define different strategies for merging different kinds of indexes.
This is an extensible gateway so you can define different strategies for merging different kinds of indexes.
(mutate {:com.wsscode.pathom.connect/keys [indexes mutate-dispatch
mutation-join-globals]
:keys [query]
:or {mutation-join-globals []}
:as env}
sym'
input)
(mutate-async {:com.wsscode.pathom.connect/keys [indexes mutate-dispatch
mutation-join-globals]
:keys [query]
:or {mutation-join-globals []}
:as env}
sym'
input)
(mutation-data env-or-indexes sym)
Get mutation map information in env from the resolver sym.
Get mutation map information in env from the resolver sym.
(mutation-dispatch env _)
Helper method that extract key from ast symbol from env. It's recommended to use as a dispatch method for creating multi-methods for mutation dispatch.
Helper method that extract key from ast symbol from env. It's recommended to use as a dispatch method for creating multi-methods for mutation dispatch.
(open-ident-reader env)
Like ident-reader, but ident key doesn't have to be in the index, this will respond to any ident join. Also supports extra context with :pathom/context param.
Like ident-reader, but ident key doesn't have to be in the index, this will respond to any ident join. Also supports extra context with :pathom/context param.
(parallel-batch {:com.wsscode.pathom.core/keys [processing-sequence path
entity-path-cache]
:as env})
(parallel-batch-error {:com.wsscode.pathom.core/keys [processing-sequence]
:as env}
e)
(parallel-reader {:com.wsscode.pathom.connect/keys [indexes max-resolver-weight]
:com.wsscode.pathom.core/keys [processing-sequence]
:com.wsscode.pathom.parser/keys [waiting]
:or {max-resolver-weight 3600000}
:as env})
(path-cost {:com.wsscode.pathom.connect/keys [resolver-weights]
:com.wsscode.pathom.core/keys [request-cache]
:as env}
path)
(pick-resolver {:com.wsscode.pathom.connect/keys [indexes dependency-track]
:as env})
(reader {:com.wsscode.pathom.connect/keys [indexes]
:as env
:com.wsscode.pathom.core/keys [processing-sequence]})
(register {:com.wsscode.pathom.connect/keys [defresolver defmutation]}
resolver-or-resolvers)
(reprocess-index {:com.wsscode.pathom.connect/keys [index-resolvers]})
This will use the ::index-resolvers to re-build the index. You might need that if in development you changed some definitions and got in a dirty state somehow
This will use the ::index-resolvers to re-build the index. You might need that if in development you changed some definitions and got in a dirty state somehow
(resolver-data env-or-indexes sym)
Get resolver map information in env from the resolver sym.
Get resolver map information in env from the resolver sym.
(resolver-dispatch env)
(resolver-dispatch env _)
Helper method that extract resolver symbol from env. It's recommended to use as a dispatch method for creating multi-methods for resolver dispatch.
Helper method that extract resolver symbol from env. It's recommended to use as a dispatch method for creating multi-methods for resolver dispatch.
(resolver-factory mm idx)
Given multi-method mm and index atom idx, returns a function with the given signature: [sym config f], the function will be add to the mm and will be indexed using config as the config params for connect/add.
Given multi-method mm and index atom idx, returns a function with the given signature: [sym config f], the function will be add to the mm and will be indexed using config as the config params for connect/add.
(sort-resolvers {:com.wsscode.pathom.core/keys [request-cache]} resolvers e)
(update-resolver-weight {:com.wsscode.pathom.connect/keys [resolver-weights]}
resolver
&
args)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close