datum-cloud / datum

Datum's central server
https://datum.net
Apache License 2.0
50 stars 7 forks source link

[Feature Request] Setup Complexity + Pagination Limits (?) #1213

Open golanglemonade opened 1 month ago

golanglemonade commented 1 month ago

Right now we have pagination setup in our resolvers, but no limit. The general best practice in graphql is to use complexity vs. hard limits but we should make sure we have those configured and see if want to enforce a higher max limit (e.g. 1000) results.

https://github.com/99designs/gqlgen/blob/master/docs/content/reference/complexity.md

https://github.com/99designs/gqlgen/blob/master/graphql/handler/extension/complexity.go

    srv.Use(extension.FixedComplexityLimit(5))