You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { createComplexityLimitRule } from 'graphql-validation-complexity';
import { ApolloServer } from '@apollo/server'; // I am using latest ApolloServer v4.
const ComplexityLimitRule = createComplexityLimitRule(1000);
The above I use as per the docs but it gives me this error:
Unexpected error: RangeError: Maximum call stack size exceeded
at ValidationContext.getFragment (node_modules/graphql/validation/ValidationContext.js:44:9)
at node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:128:38
at Array.flatMap ()
at ComplexityVisitor.flattenFragmentSpreads (node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:126:50)
at node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:131:22
at Array.flatMap ()
at ComplexityVisitor.flattenFragmentSpreads (/node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:126:50)
at node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:131:22
at Array.flatMap ()
at ComplexityVisitor.flattenFragmentSpreads (node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:126:50)
at node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:131:22
at Array.flatMap ()
at ComplexityVisitor.flattenFragmentSpreads (node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:126:50)
at node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:131:22
at Array.flatMap ()
at ComplexityVisitor.flattenFragmentSpreads (node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:126:50)
Is there a way to take care of this error locally at server side or does library needs to be modified ?
The text was updated successfully, but these errors were encountered:
@4Catalyzer
import { createComplexityLimitRule } from 'graphql-validation-complexity';
import { ApolloServer } from '@apollo/server'; // I am using latest ApolloServer v4.
const ComplexityLimitRule = createComplexityLimitRule(1000);
const apolloServer = new ApolloServer({
gateway,
plugins: [ ],
validationRules: [ComplexityLimitRule],
formatError:TestError,
});
The above I use as per the docs but it gives me this error:
Unexpected error: RangeError: Maximum call stack size exceeded
at ValidationContext.getFragment (node_modules/graphql/validation/ValidationContext.js:44:9)
at node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:128:38
at Array.flatMap ()
at ComplexityVisitor.flattenFragmentSpreads (node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:126:50)
at node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:131:22
at Array.flatMap ()
at ComplexityVisitor.flattenFragmentSpreads (/node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:126:50)
at node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:131:22
at Array.flatMap ()
at ComplexityVisitor.flattenFragmentSpreads (node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:126:50)
at node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:131:22
at Array.flatMap ()
at ComplexityVisitor.flattenFragmentSpreads (node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:126:50)
at node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:131:22
at Array.flatMap ()
at ComplexityVisitor.flattenFragmentSpreads (node_modules/graphql-validation-complexity/lib/ComplexityVisitor.js:126:50)
The text was updated successfully, but these errors were encountered: