Skip to content
This repository was archived by the owner on Sep 3, 2021. It is now read-only.

Commit cca0f40

Browse files
committed
use floats for point fields
1 parent d6b6bd0 commit cca0f40

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

src/augment/types/spatial.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ const Neo4jPointField = {
3535
* GraphQL types
3636
*/
3737
export const Neo4jPoint = {
38-
[Neo4jPointField.X]: GraphQLInt.name,
39-
[Neo4jPointField.Y]: GraphQLInt.name,
40-
[Neo4jPointField.Z]: GraphQLInt.name,
41-
[Neo4jPointField.LONGITUDE]: GraphQLInt.name,
42-
[Neo4jPointField.LATITUDE]: GraphQLInt.name,
43-
[Neo4jPointField.HEIGHT]: GraphQLInt.name,
38+
[Neo4jPointField.X]: GraphQLFloat.name,
39+
[Neo4jPointField.Y]: GraphQLFloat.name,
40+
[Neo4jPointField.Z]: GraphQLFloat.name,
41+
[Neo4jPointField.LONGITUDE]: GraphQLFloat.name,
42+
[Neo4jPointField.LATITUDE]: GraphQLFloat.name,
43+
[Neo4jPointField.HEIGHT]: GraphQLFloat.name,
4444
[Neo4jPointField.CRS]: GraphQLString.name,
4545
[Neo4jPointField.SRID]: GraphQLInt.name
4646
};

test/unit/augmentSchemaTest.test.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -1740,23 +1740,23 @@ test.cb('Test augmented schema', t => {
17401740
}
17411741
17421742
type _Neo4jPoint {
1743-
x: Int
1744-
y: Int
1745-
z: Int
1746-
longitude: Int
1747-
latitude: Int
1748-
height: Int
1743+
x: Float
1744+
y: Float
1745+
z: Float
1746+
longitude: Float
1747+
latitude: Float
1748+
height: Float
17491749
crs: String
17501750
srid: Int
17511751
}
17521752
17531753
input _Neo4jPointInput {
1754-
x: Int
1755-
y: Int
1756-
z: Int
1757-
longitude: Int
1758-
latitude: Int
1759-
height: Int
1754+
x: Float
1755+
y: Float
1756+
z: Float
1757+
longitude: Float
1758+
latitude: Float
1759+
height: Float
17601760
crs: String
17611761
srid: Int
17621762
}

0 commit comments

Comments
 (0)