Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for fourfold nested lists in introspection #3948

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/utilities/__tests__/buildClientSchema-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -877,10 +877,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 @@ -890,10 +890,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 @@ -903,11 +903,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
Loading