Commit Graph

32 Commits

Author SHA1 Message Date
lukaszraczylo 6af5aefe54 Add tracing and relevant tests (#21)
* Add tracing and relevant tests.

* fixup! Add tracing and relevant tests.

* gofmt the code 🤷

* fixup! gofmt the code 🤷
2025-01-08 18:29:25 +00:00
lukaszraczylo 5799f8ca7c fixup! Fixes the code for additional test cases. 2024-12-06 13:22:18 +00:00
lukaszraczylo ac84c69812 Fixes the code for additional test cases. 2024-12-06 12:54:36 +00:00
lukaszraczylo e54bbe8249 Additional tests to ensure that schema introspection is working as expected 2024-12-06 12:03:37 +00:00
lukaszraczylo ed3966e577 If the field is allowed, continue checking remaining fields. 2024-12-06 11:58:34 +00:00
lukaszraczylo 6a52a9f673 Fixes the issue with case comparison. 2024-12-06 11:49:47 +00:00
lukaszraczylo eb1b4b4eb7 Enhance the tests to cover the end status code as well. 2024-12-06 11:15:38 +00:00
lukaszraczylo fc9bab47fb Fix query introspection blocking on deeply nested types. 2024-12-06 11:04:26 +00:00
lukaszraczylo 6b31e5c4c0 Little code cleanup. (#19) 2024-10-10 10:34:23 +01:00
lukaszraczylo 2e1ca3584d further improvements (#18)
* Remove unnecessary mutex

* Update with latest, improved version of graphql client
2024-09-13 21:41:17 +01:00
lukaszraczylo d141fe3c04 Fix the introduced bug where RO endpoint could've been accidentally used. (#17)
* Fix the introduced bug where RO endpoint could've been accidentally used.
2024-06-28 21:48:39 +01:00
lukaszraczylo b10a28bf52 General code optimisations. (#16)
* General code optimisations.
2024-06-28 12:31:01 +01:00
lukaszraczylo 61d7a45d00 Update cache library, use miniredis for testing, add additional benchmarks. (#14)
Update cache library,
Update logging library,
use miniredis for testing, add additional benchmarks.
2024-06-19 23:10:36 +01:00
lukaszraczylo e495cf23d9 Read only endpoint support (#10)
* This change introduces ability to set additional endpoint leading to the
instance of the graphql server connected to the read only database.
If regular query is detected and endpoint for `HOST_GRAPHQL_READONLY` value is set,
the query will be proxied to it. Mutations and non-graphql will be sent
to the `HOST_GRAPHQL` endpoint.
2024-03-12 11:16:35 +00:00
lukaszraczylo 3a18e0e935 Improve stats gathering and tests improvements. (#8) 2024-03-05 22:40:06 +00:00
lukaszraczylo ebbb1c53f5 Micro fixes. 2024-02-15 10:21:51 +00:00
lukaszraczylo 0bdea741bf Move results to the struct for ease of management. 2024-02-15 09:50:51 +00:00
lukaszraczylo 756c63c0d1 Add support for 'refresh' in @cached section of the query.
Example:

```
query MyProducts @cached(refresh: true) {
  products {
    id
    name
  }
}
```
2024-02-15 09:29:27 +00:00
lukaszraczylo 4cf27e0e3b Missed on files requiring json encoding. 2024-02-05 15:37:24 +00:00
lukaszraczylo bc305dd8e9 Improve tests and speed things up a little. 2023-11-20 11:38:02 +00:00
lukaszraczylo 1390e7cdd1 Fix blocking the introspection + add unit tests. 2023-11-18 02:11:38 +00:00
lukaszraczylo a71b3950db Load retrospection query set once. 2023-11-17 22:32:58 +00:00
lukaszraczylo 827c26e88d Fix retrospection query blocking. 2023-11-17 22:29:42 +00:00
lukaszraczylo 2a0302ab75 Create allow list for event when intospection is blocked but developers
really want to use certain subqueries.
2023-10-15 10:01:23 +01:00
lukaszraczylo f41b2ae46f New: Proxy all the requests to the graphql server 2023-10-11 11:26:55 +01:00
lukaszraczylo 1a3628837f Extract helper libraries from private repo of telegram-bot.app 2023-10-10 22:16:50 +01:00
lukaszraczylo 7de1cf7cc7 Add read only mode to block all the queries with mutations. 2023-10-10 19:26:36 +01:00
lukaszraczylo 917ee1a431 Add cache ttl support (#3)
* Add ability to use `@cached(ttl: 120)`

* Update documentation.
2023-10-10 19:21:25 +01:00
lukaszraczylo e7b2cc1deb Update readme and make it release ready. 2023-10-08 18:38:55 +01:00
lukaszraczylo 3ac7c115aa Blocking introspection queries. 2023-10-08 18:07:24 +01:00
lukaszraczylo f9e917f2ea Add 'unnamed' for the operations without the name. 2023-10-07 14:35:31 +01:00
lukaszraczylo 39d3afdd05 Initial commit. 2023-10-07 11:14:20 +01:00