absinthe icon indicating copy to clipboard operation
absinthe copied to clipboard

Update Complexity documentation with gotcha's and pagination example

Open SophisticaSean opened this issue 3 years ago • 1 comments

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: https://github.com/absinthe-graphql/absinthe_relay/issues/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

SophisticaSean avatar Jan 31 '22 19:01 SophisticaSean

Looks like mix format caught a couple areas to format. Let me know if we want to drop those changes.

SophisticaSean avatar Jan 31 '22 19:01 SophisticaSean