forked from graphql/graphql-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct isSpecifiedScalarType refinement, fix graphql#2153
- Loading branch information
Showing
1 changed file
with
13 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
import { GraphQLScalarType } from './definition'; | ||
|
||
export const GraphQLInt: GraphQLScalarType; | ||
export const GraphQLFloat: GraphQLScalarType; | ||
export const GraphQLString: GraphQLScalarType; | ||
export const GraphQLBoolean: GraphQLScalarType; | ||
export const GraphQLID: GraphQLScalarType; | ||
export const GraphQLInt: GraphQLScalarType & { name: 'Int' }; | ||
export const GraphQLFloat: GraphQLScalarType & { name: 'Float' }; | ||
export const GraphQLString: GraphQLScalarType & { name: 'String' }; | ||
export const GraphQLBoolean: GraphQLScalarType & { name: 'Boolean' }; | ||
export const GraphQLID: GraphQLScalarType & { name: 'ID' }; | ||
|
||
export type SpecifiedScalarType = | ||
| typeof GraphQLInt | ||
| typeof GraphQLFloat | ||
| typeof GraphQLString | ||
| typeof GraphQLBoolean | ||
| typeof GraphQLID; | ||
|
||
export const specifiedScalarTypes: ReadonlyArray<GraphQLScalarType>; | ||
|
||
export function isSpecifiedScalarType(type: any): type is GraphQLScalarType; | ||
export function isSpecifiedScalarType(type: any): type is SpecifiedScalarType; |