Repository: graphql/graphql-js (ts)

Issue:
Decorated type deeper than introspection query. 4d array
It does not seem like this library supports 4d arrays.

I have this type defined on my server

```graphql
type MultiPolygon {
  type: GeometryType!
  coordinates: [[[[Float!]!]!]!]!
  bbox: [Float!]
}
```

When I try to load the graphql playground I get this error:

```
Uncaught Error: Decorated type deeper than introspection query.
    at m (buildClientSchema.mjs:69)
    at m (buildClientSchema.mjs:82)
    at m (buildClientSchema.mjs:72)
    at m (buildClientSchema.mjs:82)
    at m (buildClientSchema.mjs:72)
    at m (buildClientSchema.mjs:82)
    at m (buildClientSchema.mjs:72)
    at m (buildClientSchema.mjs:82)
    at w (buildClientSchema.mjs:251)
    at keyValMap.mjs:20
```

This error only occurs when I change the coordinates field from 3d to 4d.

I'm wondering if this is a bug that is fixable or is there a workaround?



Pull request description:
Add support for fourfold nested lists in introspection
This PR adds support for introspecting four-fold nested lists, which in turn allows proper representation of GeoJSON multipolygons (https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.7).

Closes #2643

Patch:
diff --git a/src/utilities/getIntrospectionQuery.ts b/src/utilities/getIntrospectionQuery.ts
index 12c2aa64..5eb182bc 100644
--- a/src/utilities/getIntrospectionQuery.ts
+++ b/src/utilities/getIntrospectionQuery.ts
@@ -152,6 +152,14 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string {
                   ofType {
                     kind
                     name
+                    ofType {
+                      kind
+                      name
+                      ofType {
+                        kind
+                        name
+                      }
+                    }
                   }
                 }
               }
diff --git a/website/docusaurus.config.cjs b/website/docusaurus.config.cjs
index c5353b57..dce7daca 100644
--- a/website/docusaurus.config.cjs
+++ b/website/docusaurus.config.cjs
@@ -24,8 +24,7 @@ module.exports = {
       ({
         docs: {
           sidebarPath: require.resolve('./sidebars.cjs'),
-          editUrl:
-            'https://github.com/graphql/graphql-js/edit/main/website/docs/',
+          editUrl: 'https://github.com/graphql/graphql-js/edit/main/website/',
         },
         theme: {
           customCss: require.resolve('./src/css/custom.css'),


Test patch:
diff --git a/src/utilities/__tests__/buildClientSchema-test.ts b/src/utilities/__tests__/buildClientSchema-test.ts
index 209943e1..818198bf 100644
--- a/src/utilities/__tests__/buildClientSchema-test.ts
+++ b/src/utilities/__tests__/buildClientSchema-test.ts
@@ -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]]]]]]]]]]
         }
       `);
 
@@ -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!]!]!]!]!]
         }
       `);
 
@@ -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!]!]!]!]!
         }
       `;