Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

getDirectiveValues

Prepares an object map of argument values given a directive definition and a AST node which may contain directives. Optionally also accepts a map of variable values.

If the directive does not exist on the node, returns undefined.

Note: The returned value is a plain Object with a prototype, since it is exposed to user code. Care should be taken to not pull values from the Object prototype.

function getDirectiveValues(
directiveDef: GraphQLDirective,
node: {
readonly directives?: ReadonlyArray<DirectiveNode>;
}
,
variableValues?: Maybe<ObjMap<unknown>>,
): undefined | {
[argument: string]: unknown;
}
;
§
getDirectiveValues(directiveDef: GraphQLDirective, node: {
readonly directives?: ReadonlyArray<DirectiveNode>;
}
, variableValues?: Maybe<ObjMap<unknown>>): undefined | {
[argument: string]: unknown;
}
[src]

§Parameters

§
node: {
readonly directives?: ReadonlyArray<DirectiveNode>;
}
[src]
§
variableValues?: Maybe<ObjMap<unknown>> optional
[src]

§Return Type

§
undefined | {
[argument: string]: unknown;
}
[src]