MCPcopy Index your code
hub / github.com/subquery/subql / toVarDefs

Function toVarDefs

packages/utils/src/graphql/builder.ts:65–67  ·  view source on GitHub ↗
(vars: GqlVar[])

Source from the content-addressed store, hash-verified

63};
64
65const toVarDefs = (vars: GqlVar[]): string => {
66 return vars && vars.length ? `(${vars.map((item) => `$${item.name}:${item.gqlType}`)})` : ``;
67};
68
69const toVariables = (vars: GqlVar[]) =>
70 vars.reduce(

Callers 1

buildQueryFunction · 0.85

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected