Skip to content

Commit

Permalink
export flow types from introspection query result
Browse files Browse the repository at this point in the history
  • Loading branch information
leebyron committed Jul 31, 2015
1 parent e6b8e58 commit aa5902c
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions src/utilities/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* @flow */
/**
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
Expand Down Expand Up @@ -37,3 +38,48 @@ export { isValidJSValue } from './isValidJSValue';

// Determine if AST values adhere to a GraphQL type.
export { isValidLiteralValue } from './isValidLiteralValue';


// Export flow types.

// Note: a future version of flow may support `export type {} from ''`, but
// until then, this is a viable workaround.

// IntrospectionQuery is the type of the result expected by requesting
// GraphQL with `introspectionQuery`.
import type {
IntrospectionQuery,
IntrospectionSchema,
IntrospectionType,
IntrospectionScalarType,
IntrospectionObjectType,
IntrospectionInterfaceType,
IntrospectionUnionType,
IntrospectionEnumType,
IntrospectionInputObjectType,
IntrospectionTypeRef,
IntrospectionNamedTypeRef,
IntrospectionListTypeRef,
IntrospectionNonNullTypeRef,
IntrospectionField,
IntrospectionInputValue,
IntrospectionEnumValue,
IntrospectionDirective,
} from './introspectionQuery';
export type IntrospectionQuery = IntrospectionQuery;
export type IntrospectionSchema = IntrospectionSchema;
export type IntrospectionType = IntrospectionType;
export type IntrospectionScalarType = IntrospectionScalarType;
export type IntrospectionObjectType = IntrospectionObjectType;
export type IntrospectionInterfaceType = IntrospectionInterfaceType;
export type IntrospectionUnionType = IntrospectionUnionType;
export type IntrospectionEnumType = IntrospectionEnumType;
export type IntrospectionInputObjectType = IntrospectionInputObjectType;
export type IntrospectionTypeRef = IntrospectionTypeRef;
export type IntrospectionNamedTypeRef = IntrospectionNamedTypeRef;
export type IntrospectionListTypeRef = IntrospectionListTypeRef;
export type IntrospectionNonNullTypeRef = IntrospectionNonNullTypeRef;
export type IntrospectionField = IntrospectionField;
export type IntrospectionInputValue = IntrospectionInputValue;
export type IntrospectionEnumValue = IntrospectionEnumValue;
export type IntrospectionDirective = IntrospectionDirective;

0 comments on commit aa5902c

Please sign in to comment.