MCPcopy
hub / github.com/subquery/subql / buildQuery

Function buildQuery

packages/utils/src/graphql/builder.ts:81–86  ·  view source on GitHub ↗
(vars: GqlVar[], nodes: GqlNode[])

Source from the content-addressed store, hash-verified

79 );
80
81export function buildQuery(vars: GqlVar[], nodes: GqlNode[]): GqlQuery {
82 return {
83 query: `query${toVarDefs(vars)}{${nodes.map((node) => bindProjections(node)).join(' ')}}`,
84 variables: toVariables(vars),
85 };
86}

Callers 4

builder.spec.tsFile · 0.90
dictionaryQueryFunction · 0.90
metadataQueryFunction · 0.90
specVersionQueryMethod · 0.90

Calls 4

toVarDefsFunction · 0.85
bindProjectionsFunction · 0.85
toVariablesFunction · 0.85
mapMethod · 0.80

Tested by

no test coverage detected