Skip to content

Commit 8317a11

Browse files
committed
Merge pull request #105 from nemanja-stanarevic/master
Fixes issue #104 with buildASTSchema and Float fields
2 parents 5fe05af + 3466fc9 commit 8317a11

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/utilities/__tests__/buildASTSchema.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ describe('Schema Materializer', () => {
3232
type HelloScalars {
3333
str: String
3434
int: Int
35+
float: Float
36+
id: ID
3537
bool: Boolean
3638
}
3739
`;
@@ -85,6 +87,10 @@ type TypeTwo {
8587
var body = `
8688
type Hello {
8789
str(int: Int): String
90+
floatToStr(float: Float): String
91+
idToStr(id: ID): String
92+
booleanToStr(bool: Boolean): String
93+
strToStr(bool: String): String
8894
}
8995
`;
9096
var output = cycleOutput(body, 'Hello');

src/utilities/buildASTSchema.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import {
4747
GraphQLInputObjectType,
4848
GraphQLString,
4949
GraphQLInt,
50+
GraphQLFloat,
5051
GraphQLBoolean,
5152
GraphQLID,
5253
GraphQLList,
@@ -115,6 +116,7 @@ export function buildASTSchema(
115116
var innerTypeMap = {
116117
String: GraphQLString,
117118
Int: GraphQLInt,
119+
Float: GraphQLFloat,
118120
Boolean: GraphQLBoolean,
119121
ID: GraphQLID,
120122
};

0 commit comments

Comments
 (0)