Skip to content

Commit

Permalink
fix(utils): use 3 as inspect recursive depth
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Mar 22, 2022
1 parent 828fa8d commit be2c02d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/few-bees-compare.md
@@ -0,0 +1,5 @@
---
'@graphql-tools/utils': patch
---

fix(utils): use 3 as inspect recursive depth
7 changes: 3 additions & 4 deletions packages/utils/src/inspect.ts
Expand Up @@ -4,8 +4,7 @@
import { GraphQLError } from 'graphql';
import { isAggregateError } from './AggregateError';

const MAX_ARRAY_LENGTH = 10;
const MAX_RECURSIVE_DEPTH = 2;
const MAX_RECURSIVE_DEPTH = 3;

/**
* Used to print values in error messages.
Expand Down Expand Up @@ -93,8 +92,8 @@ function formatArray(array: ReadonlyArray<unknown>, seenValues: ReadonlyArray<un
return '[Array]';
}

const len = Math.min(MAX_ARRAY_LENGTH, array.length);
const remaining = array.length - len;
const len = array.length;
const remaining = array.length;
const items = [];

for (let i = 0; i < len; ++i) {
Expand Down

1 comment on commit be2c02d

@vercel
Copy link

@vercel vercel bot commented on be2c02d Mar 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.