UNPKG

@graphql-tools/utils

Version:

Common package containing utils and types for GraphQL tools

11 lines (10 loc) 617 B
import { DirectiveNode, GraphQLDirective } from 'graphql'; import { VariableValues } from './types.js'; /** * GraphQL v17's getDirectiveValues function accepts `VariableValues` * while older versions accept `Record<string, any>`. This function wraps the original * getDirectiveValues function to provide compatibility across versions. */ export declare function getDirectiveValues<TVariables = Record<string, unknown>>(directiveDef: GraphQLDirective, node: { readonly directives?: ReadonlyArray<DirectiveNode> | undefined; }, variableValues?: VariableValues<TVariables>): undefined | Record<string, unknown>;