Skip to content

Commit bec1b49

Browse files
authored
Support fourfold nested lists (#3950)
1 parent bf6a9f0 commit bec1b49

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

src/utilities/__tests__/buildClientSchema-test.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -879,10 +879,10 @@ describe('Type System: build schema from introspection', () => {
879879
});
880880

881881
describe('very deep decorators are not supported', () => {
882-
it('fails on very deep (> 7 levels) lists', () => {
882+
it('fails on very deep (> 8 levels) lists', () => {
883883
const schema = buildSchema(`
884884
type Query {
885-
foo: [[[[[[[[String]]]]]]]]
885+
foo: [[[[[[[[[[String]]]]]]]]]]
886886
}
887887
`);
888888

@@ -892,10 +892,10 @@ describe('Type System: build schema from introspection', () => {
892892
);
893893
});
894894

895-
it('fails on a very deep (> 7 levels) non-null', () => {
895+
it('fails on a very deep (> 8 levels) non-null', () => {
896896
const schema = buildSchema(`
897897
type Query {
898-
foo: [[[[String!]!]!]!]
898+
foo: [[[[[String!]!]!]!]!]
899899
}
900900
`);
901901

@@ -905,11 +905,11 @@ describe('Type System: build schema from introspection', () => {
905905
);
906906
});
907907

908-
it('succeeds on deep (<= 7 levels) types', () => {
909-
// e.g., fully non-null 3D matrix
908+
it('succeeds on deep (<= 8 levels) types', () => {
909+
// e.g., fully non-null 4D matrix
910910
const sdl = dedent`
911911
type Query {
912-
foo: [[[String!]!]!]!
912+
foo: [[[[String!]!]!]!]!
913913
}
914914
`;
915915

src/utilities/getIntrospectionQuery.ts

+8
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,14 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string {
152152
ofType {
153153
kind
154154
name
155+
ofType {
156+
kind
157+
name
158+
ofType {
159+
kind
160+
name
161+
}
162+
}
155163
}
156164
}
157165
}

0 commit comments

Comments
 (0)