Commit graph

17 commits

Author SHA1 Message Date
GitLab Bot
6ab9cdec26 Add latest changes from gitlab-org/gitlab@master 2020-10-06 12:08:38 +00:00
GitLab Bot
895563036a Add latest changes from gitlab-org/gitlab@master 2020-10-02 03:08:28 +00:00
GitLab Bot
a0b26c6df5 Add latest changes from gitlab-org/gitlab@master 2020-06-29 12:09:20 +00:00
GitLab Bot
a5650b86b5 Add latest changes from gitlab-org/gitlab@master 2020-05-13 21:08:55 +00:00
GitLab Bot
27a18afc7d Add latest changes from gitlab-org/gitlab@master 2020-02-04 00:09:04 +00:00
GitLab Bot
d10a462fed Add latest changes from gitlab-org/gitlab@master 2019-12-16 12:07:43 +00:00
GitLab Bot
8cc5f27909 Add latest changes from gitlab-org/gitlab@master 2019-12-13 12:07:41 +00:00
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