Skip to content

Commit

Permalink
Support fourfold nested lists (#3950)
Browse files Browse the repository at this point in the history
  • Loading branch information
gschulze committed Aug 14, 2023
1 parent bf6a9f0 commit bec1b49
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/utilities/__tests__/buildClientSchema-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -879,10 +879,10 @@ describe('Type System: build schema from introspection', () => {
});

describe('very deep decorators are not supported', () => {
it('fails on very deep (> 7 levels) lists', () => {
it('fails on very deep (> 8 levels) lists', () => {
const schema = buildSchema(`
type Query {
foo: [[[[[[[[String]]]]]]]]
foo: [[[[[[[[[[String]]]]]]]]]]
}
`);

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

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

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

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

Expand Down
8 changes: 8 additions & 0 deletions src/utilities/getIntrospectionQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,14 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string {
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
Expand Down

0 comments on commit bec1b49

Please sign in to comment.