GraphQL Query Depth Limiting #50
Answered
by
enisdenjo
4815162342
asked this question in
Q&A
-
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.
Answered by
enisdenjo
Feb 9, 2023
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.
1 reply
Answer selected by
enisdenjo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: