Skip to content

Commit 28e4ea5

Browse files
committed
Add support for fourfold nested lists in introspection
1 parent 3610786 commit 28e4ea5

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
@@ -877,10 +877,10 @@ describe('Type System: build schema from introspection', () => {
877877
});
878878

879879
describe('very deep decorators are not supported', () => {
880-
it('fails on very deep (> 7 levels) lists', () => {
880+
it('fails on very deep (> 8 levels) lists', () => {
881881
const schema = buildSchema(`
882882
type Query {
883-
foo: [[[[[[[[String]]]]]]]]
883+
foo: [[[[[[[[[[String]]]]]]]]]]
884884
}
885885
`);
886886

@@ -890,10 +890,10 @@ describe('Type System: build schema from introspection', () => {
890890
);
891891
});
892892

893-
it('fails on a very deep (> 7 levels) non-null', () => {
893+
it('fails on a very deep (> 8 levels) non-null', () => {
894894
const schema = buildSchema(`
895895
type Query {
896-
foo: [[[[String!]!]!]!]
896+
foo: [[[[[String!]!]!]!]!]
897897
}
898898
`);
899899

@@ -903,11 +903,11 @@ describe('Type System: build schema from introspection', () => {
903903
);
904904
});
905905

906-
it('succeeds on deep (<= 7 levels) types', () => {
907-
// e.g., fully non-null 3D matrix
906+
it('succeeds on deep (<= 8 levels) types', () => {
907+
// e.g., fully non-null 4D matrix
908908
const sdl = dedent`
909909
type Query {
910-
foo: [[[String!]!]!]!
910+
foo: [[[[String!]!]!]!]!
911911
}
912912
`;
913913

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)