GraphQL Query Depth Limiting #50
-
Hey everyone - like a few others, I'm migrating my express GraphQL servers from the Is anyone aware of a similar solution for this package? Or an easy way to adapt that one for |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey there, I've just released v1.14.0 with #51 that simplifies this process. You can add the depth limit validation rule from the import { createHandler } from 'graphql-http';
import depthLimit from 'graphql-depth-limit';
import { schema } from './my-schema';
const handler = createHandler({
schema,
validationRules: [depthLimit(7)],
}); |
Beta Was this translation helpful? Give feedback.
Hey there, I've just released v1.14.0 with #51 that simplifies this process. You can add the depth limit validation rule from the
graphql-depth-limit
package like this: