Update Complexity documentation with gotcha's and pagination example #1150
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello! I recently spent two weeks diagnosing and fixing complexity analysis in my graphql schema to prevent Denial of Service attacks against our graphql server.
We discussed this issue in absinthe relay here: absinthe-graphql/absinthe_relay#192
@benwilson512 Recommended I add this to the complexity documenation so I distilled most of my findings down and into the graphql complexity documentation to try to help future users of this wonderful library.
Let me know if I should change anything or if we'd prefer this somewhere else! Thanks bunches!
P.S. There may be more specific work to do on DoS mitigation in this library and I would love to discuss this further if anyone is interested. I would love to see some automatic DoS mitigation techniques on documents that are too complex or taking too long to resolve. We recently engaged with a security pentesting team to test our production absinthe application and it does seem like it's pretty easy to implement a schema vulnerable to DoS attacks and it doesn't seem like absinthe ships with any mitigation techniques currently! :)
View the updated markdown here: https://github.com/absinthe-graphql/absinthe/blob/4497bd2066bc41000b519a2b8c538ae043a92408/guides/complexity-analysis.md