Skip to content

Commit 855b0b5

Browse files
changed introspector generated field type in case of list, list are now generated as list of non nullable elmements
1 parent 403eebc commit 855b0b5

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

packages/introspector/src/transforms/neo4j-graphql/utils/map-neo4j-to-graphql-type.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@ const map = {
3434
Point: "Point",
3535

3636
// Array types
37-
LongArray: "[BigInt]",
38-
DoubleArray: "[Float]",
39-
FloatArray: "[Float]",
40-
IntegerArray: "[BigInt]",
41-
BooleanArray: "[Boolean]",
42-
StringArray: "[String]",
43-
DateArray: "[Date]",
44-
DateTimeArray: "[DateTime]",
45-
TimeArray: "[Time]",
46-
LocalTimeArray: "[LocalTime]",
47-
LocalDateTimeArray: "[LocalDateTime]",
48-
DurationArray: "[Duration]",
49-
PointArray: "[Point]",
37+
LongArray: "[BigInt!]",
38+
DoubleArray: "[Float!]",
39+
FloatArray: "[Float!]",
40+
IntegerArray: "[BigInt!]",
41+
BooleanArray: "[Boolean!]",
42+
StringArray: "[String!]",
43+
DateArray: "[Date!]",
44+
DateTimeArray: "[DateTime!]",
45+
TimeArray: "[Time!]",
46+
LocalTimeArray: "[LocalTime!]",
47+
LocalDateTimeArray: "[LocalDateTime!]",
48+
DurationArray: "[Duration!]",
49+
PointArray: "[Point!]",
5050
};
5151

5252
export default function mapNeo4jToGraphQLType(neo4jType: string[], mandatory?: boolean): string {

packages/introspector/tests/integration/graphql/graphs.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ describe("GraphQL - Infer Schema on graphs", () => {
213213
expect(typeDefs).toMatchInlineSnapshot(`
214214
"type ActedInProperties @relationshipProperties {
215215
pay: Float
216-
roles: [String]!
216+
roles: [String!]!
217217
}
218218
219219
type Actor @node {
@@ -269,7 +269,7 @@ describe("GraphQL - Infer Schema on graphs", () => {
269269
const typeDefs = await toGraphQLTypeDefs(sessionFactory(bm));
270270
expect(typeDefs).toMatchInlineSnapshot(`
271271
"type ActedInProperties @relationshipProperties {
272-
roles: [String]!
272+
roles: [String!]!
273273
}
274274
275275
type Actor_Label @node(labels: [\\"Actor-Label\\"]) {

packages/introspector/tests/integration/graphql/nodes.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ describe("GraphQL - Infer Schema nodes basic tests", () => {
127127
"type TestLabel @node {
128128
intProp: BigInt!
129129
numberProp: Float!
130-
strArrProp: [String]!
130+
strArrProp: [String!]!
131131
strProp: String!
132132
}"
133133
`);

0 commit comments

Comments
 (0)