mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-06 06:19:58 +08:00
Add "getDirectiveValues"
This commit is contained in:
@@ -1 +0,0 @@
|
||||
execution/values.d.ts
|
||||
2
types/graphql/execution/index.d.ts
vendored
2
types/graphql/execution/index.d.ts
vendored
@@ -4,3 +4,5 @@ export {
|
||||
responsePathAsArray,
|
||||
ExecutionResult
|
||||
} from './execute';
|
||||
|
||||
export { getDirectiveValues } from './values';
|
||||
|
||||
13
types/graphql/execution/values.d.ts
vendored
13
types/graphql/execution/values.d.ts
vendored
@@ -23,3 +23,16 @@ export function getArgumentValues(
|
||||
node: FieldNode | DirectiveNode,
|
||||
variableValues?: { [key: string]: any }
|
||||
): { [key: string]: any };
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
export function getDirectiveValues(
|
||||
directiveDef: GraphQLDirective,
|
||||
node: { directives?: Array<DirectiveNode> },
|
||||
variableValues?: { [key: string]: any }
|
||||
): void | { [key: string]: any };
|
||||
|
||||
3
types/graphql/index.d.ts
vendored
3
types/graphql/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for graphql 0.10
|
||||
// Type definitions for graphql 0.11
|
||||
// Project: https://www.npmjs.com/package/graphql
|
||||
// Definitions by: TonyYang <https://github.com/TonyPythoneer>
|
||||
// Caleb Meredith <https://github.com/calebmer>
|
||||
@@ -28,6 +28,7 @@ export {
|
||||
execute,
|
||||
defaultFieldResolver,
|
||||
responsePathAsArray,
|
||||
getDirectiveValues,
|
||||
ExecutionResult,
|
||||
} from './execution';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user