From e36368e475c38039ec03fd26b273bd52003dfad4 Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Thu, 6 Sep 2018 13:27:02 +0300 Subject: [PATCH] Export "ValidationRule" type (#1504) Intended to be used here: https://github.com/graphql/express-graphql/blob/ab2262fa60f9f6e38a626642f08573c7698628a6/src/index.js#L84 And in other similar tools that accept validation rules. --- src/index.js | 2 ++ src/validation/index.js | 1 + 2 files changed, 3 insertions(+) diff --git a/src/index.js b/src/index.js index b91cf7231d..3c4ee5408d 100644 --- a/src/index.js +++ b/src/index.js @@ -321,6 +321,8 @@ export { VariablesInAllowedPositionRule, } from './validation'; +export type { ValidationRule } from './validation'; + // Create, format, and print GraphQL errors. export { GraphQLError, formatError, printError } from './error'; diff --git a/src/validation/index.js b/src/validation/index.js index 5bd949765e..61b0b36004 100644 --- a/src/validation/index.js +++ b/src/validation/index.js @@ -10,6 +10,7 @@ export { validate } from './validate'; export { ValidationContext } from './ValidationContext'; +export type { ValidationRule } from './ValidationContext'; export { specifiedRules } from './specifiedRules';