Commit graph

10 commits

Author SHA1 Message Date
charlieablett
d08a78f4b0 Allow tests to ignore recursion 2019-10-23 15:35:33 +13:00
charlieablett
32cdfb9535 Check for recursion and fail if too recursive
- List all overly-recursive fields
- Reduce recursion threshold to 2
- Add test for not-recursive-enough query
- Use reusable methods in tests
- Add changelog
- Set changeable acceptable recursion level
- Add error check test helpers
2019-10-23 15:35:33 +13:00
charlie ablett
699532232c Apply reviewer feedback
- Comply doc with guidelines
- Improve tests for readability and completeness
- Separate out phases visually with newlines
- Add `format_message` test
- test readability
- code and test structure/styling
- static query analyzers
- call `as_json` on `provided_variables`
- add exception handling
2019-05-31 19:57:02 +12:00
charlieablett
5f0c230a18 Move complexity/depth to final_value
Tidy tests according to reviewer comments.
Move complexity and depth calls from `initial_value` to `final_value`
Log variables as json
2019-05-30 18:27:42 +12:00
charlieablett
184a5120dc Call analyzers from LoggerAnalyzer
- Add changelog file
- Fix failing tests
2019-05-30 18:27:28 +12:00
charlieablett
b94a17e00e Add GraphQL logging feature flag 2019-05-30 18:27:28 +12:00
charlieablett
2a10064167 Restructure complexity analyzer
Remove instance variables for class re-use, test individual methods,
use `monotonic_time`
2019-05-30 18:27:28 +12:00
charlieablett
2c011cb5b4 Implement logger analyzer
- Modify GraphqlLogger to subclass JsonLogger
- Replace the single-line analyser with one that can log all the GraphQL
query related information in one place.
- Implement analyzer behavior with spec
2019-05-30 18:27:28 +12:00
charlieablett
1f37aed1c9 New logfile for graphql queries
Specify dedicated logfile and logger class for GraphQL queries. Move
complexity analyzer to a dedicated class.
2019-05-30 18:27:28 +12:00
Brett Walker
f458c56107 Initial field and query complexity limits
It makes all Types::BaseField default to a complexity of 1.

Queries themselves now have limited complexity, scaled
to the type of user: no user, authenticated user, or an
admin user.
2019-04-04 08:39:30 -05:00