Commit Graph

1794 Commits

Author SHA1 Message Date
Solomon
fd0ba0013d Adds Agent availability check to dc_add_agent metadata action
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7792
GitOrigin-RevId: 5ba1669b27078a45a4efe2ba736908a4929a2a50
2023-02-17 01:30:51 +00:00
Philip Lykke Carlsen
ecd0e7c3f4 fix, Sql Server: Properly quote delimited identifiers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7929
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 4ed630dcf6851a92980571c8041273512c69c622
2023-02-16 11:20:11 +00:00
Jesse Hallett
b235e94e28 ci: fix an error in a recently-added buildkite test script
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8001
GitOrigin-RevId: 12f7d66772eb6d9b011b7a77a85544ffeb6ec270
2023-02-15 21:07:52 +00:00
Daniel Harvey
3b42e704dd [server] Custom types prototype
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7807
Co-authored-by: Tom Harding <6302310+i-am-tom@users.noreply.github.com>
GitOrigin-RevId: ee3c644b92aa71a236d247a0cfc5deb7846f91c2
2023-02-15 17:56:58 +00:00
Tom Harding
565176c155 Remove NativeQueryMetadata
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7980
GitOrigin-RevId: caadc019cc1f7824a65de10b20415ff736b1aafb
2023-02-15 16:27:47 +00:00
Varun Choudhary
ea76e01b0f console: support suffix for tls allow list
[GS-392]: https://hasurahq.atlassian.net/browse/GS-392?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7745
Co-authored-by: Krushan Bauva <31391329+krushanbauva@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: 72c9a2eef1cfaaefa30a7d53764b1c3688b38ae7
2023-02-15 10:26:41 +00:00
Gil Mizrahi
7a3c1489ad set omit_request_id to true by default
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7978
GitOrigin-RevId: 7e359979b304ff63b8e582e460c7668f8207fe75
2023-02-15 09:53:19 +00:00
awjchen
2df8589097 server: fix race condition in metadata update
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7984
GitOrigin-RevId: edd4a581a5b785e7a09b2d4c8b2a5c6ccc7f8b63
2023-02-15 06:12:59 +00:00
Gil Mizrahi
20e72ddb29 reject untrack naqi when naqi does not exist
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7975
GitOrigin-RevId: e56385e7396c3980d78b53acc6e9b3656fd9909d
2023-02-14 14:40:15 +00:00
Philip Lykke Carlsen
fed36dadc7 Fix: Unable to use environment variable for CockroachDB connection string in Cloud
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7883
GitOrigin-RevId: b1f515c4de3b5f345991a0fad1152f42169f9d0d
2023-02-14 12:15:58 +00:00
Auke Booij
334660d906 server: refactor FromJSON FromIntrospection instances
- Inline a few instances to avoid code duplication
- Use `(<$>)` to avoid `let`
- Improve error reporting when types of invalid kind are specified in `possibleTypes` or `interfaces`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7540
GitOrigin-RevId: 954fb710f94a275daff938b9a6e58765c4286d0c
2023-02-13 07:50:12 +00:00
Karthikeyan Chinnakonda
958a5e1a33 Include cron trigger's name in the error message
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7914
GitOrigin-RevId: 7bce2788ac154e7673402022414ab1fff653340d
2023-02-13 07:11:57 +00:00
Lyndon Maydwell
5a3f10363d Fixing omit_tracked argument to suggest_relationships API to be more granular
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7900
GitOrigin-RevId: 2116875b866ffc79ce5e3604751c62b8ac9c37e3
2023-02-10 01:53:30 +00:00
Antoine Leblanc
dec8579db8 Allow backend execution to happen on the base app monad.
### Description

Each Backend executes queries against the database in a slightly different stack: Postgres uses its own `TXeT`, MSSQL uses a variant of it, BigQuery is simply in `ExceptT QErr IO`... To accommodate those variations, we had originally introduced an `ExecutionMonad b` type family in `BackendExecute`, allowing each backend to describe its own stack. It was then up to that backend's `BackendTransport` instance to implement running said stack, and converting the result back into our main app monad.

However, this was not without complications: `TraceT` is one of them: as it usually needs to be on the top of the stack, converting from one stack to the other implies the use `interpTraceT`, which is quite monstrous. Furthermore, as part of the Entitlement Services work, we're trying to move to a "Services" architecture in which the entire engine runs in one base monad, that delegates features and dependencies to monad constraints; and as a result we'd like to minimize the number of different monad stacks we have to maintain and translate from and to in the codebase.

To improve things, this PR changes `ExecutionMonad b` from an _absolute_ stack to a _relative_ one: i.e.: what needs to be stacked on top of our base monad for the execution. In `Transport`, we then only need to pop the top of the stack, and voila. This greatly simplifies the implementation of the backends, as there's no longer any need to do any stack transformation: MySQL's implementation becomes a `runIdentityT`! This also removes most mentions of `TraceT` from the execution code since it's no longer required: we can rely on the base monad's existing `MonadTrace` constraint.

To continue encapsulating monadic actions in `DBStepInfo` and avoid threading a bunch of `forall` all over the place, this PR introduces a small local helper: `OnBaseMonad`. One only downside of all this is that this requires adding `MonadBaseControl IO m` constraint all over the place: previously, we would run directly on `IO` and lift, and would therefore not need to bring that constraint all the way.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7789
GitOrigin-RevId: e9b2e431c5c47fa9851abf87545c0415ff6d1a12
2023-02-09 14:40:04 +00:00
Tom Harding
89bbb24c54 Monomorphise NativeQueryName
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7865
GitOrigin-RevId: 6c26edeb40f3b523053ffc45220a3c1046585de3
2023-02-08 15:48:12 +00:00
Anon Ray
85a7e03526 docs: add explanation of livequery-poller-log (GS-284)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7372
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: 75fd9300749417695941fe552f3f06bb08c55c10
2023-02-08 07:23:49 +00:00
Solomon
4d3e80a0b5 [Gardening] Eliminate boolean blindness in rsoWebSocketCompression
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7818
GitOrigin-RevId: cb3b8b8ebf7bd296c88c782c8bc457397a88f8ea
2023-02-08 04:15:01 +00:00
Solomon
9b6b44c888 [Gardening] Eliminate boolean blindness in soAllowList
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7815
GitOrigin-RevId: 6768abb39e7ab6b12be8989702223500119169de
2023-02-08 03:36:45 +00:00
Solomon
97dc0408d1 [Gardening] Eliminate boolean blindness in soDevMode
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7814
GitOrigin-RevId: 593b8e764a8dca5aa9b4a9008d341a5d814f28fc
2023-02-08 02:58:32 +00:00
Solomon
807be5f2bf [Gardening] Eliminate Boolean Blindness in soEnableTelemetry option
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7812
GitOrigin-RevId: 0b25624cb600a6d9976737b524c8cd60d160f174
2023-02-08 01:47:56 +00:00
Solomon
caad80ab7f [Gardening] Eliminate boolean blindness in so soWsReadCookie
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7813
GitOrigin-RevId: 6aae2eda1765e302a08c676988b6a7f9432e9977
2023-02-08 00:57:41 +00:00
pranshi06
12e276cbc6 server: fix nullable field omitted from action response when omitted in the webhook response
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7795
GitOrigin-RevId: d0c3dc7e092af3b8dc8ad18a97462d0fea4e74f3
2023-02-07 15:34:07 +00:00
Rakesh Emmadi
e6c5a9505b server: log when cron triggers are fetched from database for generating events
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7725
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: 8dd2b07c769392e057400c5e60e40e7fc56ac26f
2023-02-07 12:23:42 +00:00
Auke Booij
36a9de5215 server: reintroduce Content-Type header for errors
Fix regression introduced by hasura/graphql-engine-mono#7444.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7827
GitOrigin-RevId: 468f2a53f44b732c09f09ca71a3a2c4b38e4e360
2023-02-07 11:27:28 +00:00
Solomon
7027af5a05 [Gardening] Eliminate Boolean Blindness in soEnableConsole option
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7810
GitOrigin-RevId: 69f84d52e5f61e88b668abb3898344ccfbc0d26d
2023-02-07 05:59:45 +00:00
Jesse Hallett
2d513ace63 server: codecs for CustomTypes
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7838
GitOrigin-RevId: 09a9be0cee748226321f0cf09401b18c2f31e930
2023-02-07 03:47:35 +00:00
David Overton
98af923df5 MongoDB Data Connector prototype agent
Basic MongoDB agent. This is intended as a starting point for playing with nested documents in a MongoDB back end. Currently supports basic queries with projections, where expressions, limit and offset. No support for joins, aggregates or mutations.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7840
GitOrigin-RevId: 3f03b8416c95acf2b68da1db56cbe36a513a4bde
2023-02-07 02:57:06 +00:00
Solomon
d8ff0329a0 Eliminate Template Haskell from Hasura.RQL.Types.Common
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7819
GitOrigin-RevId: bf5d1616a90a771e1c72321b64b38d9c153b0e94
2023-02-06 22:03:02 +00:00
Solomon
bf4e514ebf [Gardening] Remove where clause from mkServeOptions and add haddocks.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7809
GitOrigin-RevId: 3a440eaa397045c95fcff4316ef3c0438a754c7c
2023-02-06 19:15:06 +00:00
Daniel Chambers
7a4bde9652 Added result_type property to SingleColumnAggregate
[GDC-756]: https://hasurahq.atlassian.net/browse/GDC-756?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7793
GitOrigin-RevId: b8201615984a71a9f41bed4195e2435e362cf383
2023-02-06 04:20:17 +00:00
Gil Mizrahi
f90373b1ca NaQI - validate against the database - infra and check syntax
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7778
GitOrigin-RevId: c8366ad7261d9c120dc0612bedb96fa5ae59eda3
2023-02-03 16:29:22 +00:00
paritosh-08
775bdc8026 server: move event trigger schedule cleanup logic
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7606
Co-authored-by: Krushan Bauva <31391329+krushanbauva@users.noreply.github.com>
GitOrigin-RevId: 95819347aff4e6a86b2bc9acf214222e05dba496
2023-02-03 12:30:00 +00:00
Daniel Harvey
d32e734310 [server] Pass parameters to native queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7727
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: ddca3d962c05024913ce6ec4c6b4ea4a0f4a6a8c
2023-02-03 11:16:29 +00:00
Solomon
621a346ca7 Simplify SourceKindInfo ToJSON instance
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7787
GitOrigin-RevId: f481c7b3dadbbd9b97655187a486954e0e17ae4f
2023-02-03 01:47:02 +00:00
Antoine Leblanc
e99f9a2f57 Remove MetadataStorageT, clean up error handling.
## Description

This PR removes `MetadataStorageT`, and cleans up all top-level error handling. In short: this PR changes `MonadMetadataStorage` to explicitly return a bunch of `Either QErr a`, instead of relying on the stack providing a `MonadError QErr`. Since we implement that class on the base monad *below any ExceptT*, this removes a lot of very complicated instances that make assumptions about the shape of the stack.

On the back of this, we can remove several layers of ExceptT from the core of the code, including the one in `RunT`, which allows us to remove several instances of `liftEitherM . runExceptT`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7689
GitOrigin-RevId: 97d600154d690f58c0b93fb4cc2d30fd383fd8b8
2023-02-03 01:05:09 +00:00
Tom Harding
64f79daa3f Allow pg_run_sql as well as run_sql to remove some string-bodging
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7465
GitOrigin-RevId: 754866121fbd631273ae00a2305c8ddbba286596
2023-02-02 14:04:52 +00:00
Lyndon Maydwell
9a54849985 Fixing issues with SQLite FKs in Schema and Suggest Relationships API Docs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7729
GitOrigin-RevId: 4ae48019ce71f6ceb3f6d06524302bdd11ca1ed4
2023-02-02 11:37:32 +00:00
Philip Lykke Carlsen
69ae616ae5 Bump autodocodec to 0.2.0.3, ditch Data.Voidable
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7753
GitOrigin-RevId: c5dce6cf125b6bc53fd5ac7b689d1ed71fd6257b
2023-02-02 10:54:59 +00:00
Antoine Leblanc
30e772d3fa add content-length header.
## Description

Adds a content-length response header to all endpoints. This PR tests this feature by checking the content-length of every request we send in the tests.

## Changelog ✍️

__Component__ : server

__Type__: enhancement

__Product__: community-edition

### Short Changelog

add a content-length response header to all endpoints

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7444
Co-authored-by: Manas Agarwal <5352361+manasag@users.noreply.github.com>
GitOrigin-RevId: a0a811852053c5dde4b11b71ba11a7d456c84d76
2023-02-01 21:32:50 +00:00
Tom Harding
a425c97e1e Remove redundant Backend constraints
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7757
GitOrigin-RevId: b5bc017b0ee3a9daeca78437278525be17a33f4f
2023-02-01 19:48:21 +00:00
Tom Harding
e41654b133 Reject MonadUnique, embrace IO
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7751
GitOrigin-RevId: 3edc4dee10d58afac911c9862e3b55a4c458a293
2023-02-01 18:57:46 +00:00
Tom Harding
18b346bf44 Extract Hasura.Incremental into lib/hasura-incremental
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7534
GitOrigin-RevId: 85863cee836d348e8e314f8af1b50bb5cd912b46
2023-02-01 12:25:33 +00:00
Daniel Harvey
4418d294f9 [server] parse native query in metadata call
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7731
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 96d60c72da05970f5b34f310f9fe71d9f67387a1
2023-02-01 08:46:19 +00:00
Karthikeyan Chinnakonda
0406cd2ef0 server: refactor the clear_metadata and the replace_metadata API handler
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7631
GitOrigin-RevId: 69a05f175f7fda1ed6a2dfb311b3f331b209a5aa
2023-01-31 17:41:09 +00:00
Daniel Harvey
17dbc7bc32 [server] parser for interpolated SQL queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7726
GitOrigin-RevId: 4b6ad28aa8a4d75bfcf6ce1ec4d89324f7f1ae74
2023-01-31 12:54:11 +00:00
Gil Mizrahi
cabb6ada1c naqi arguments field is optional
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7712
GitOrigin-RevId: c45a94c16fd9b7b0f3d40085949c4571ac31ca09
2023-01-31 10:55:02 +00:00
Solomon
59a1fc2102 Re-enable Optimizations in Hasura.Server.Init Module
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5306
GitOrigin-RevId: 8ae8184abbaabc06a25c4977f19f2fd19cf12bf4
2023-01-31 00:28:58 +00:00
Gil Mizrahi
e7d5b989ab add omit_request_id flag
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7697
GitOrigin-RevId: 6716b263526fd97609f33cd78ec254a24c14b679
2023-01-31 00:28:50 +00:00
Philip Lykke Carlsen
70c8bc8700 Integrating Native Query metadata and schema
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7657
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: d5047559e3560f5d7870eac6e07c89704146ccab
2023-01-30 16:06:34 +00:00
Rakesh Emmadi
ab99215828 server: log when events of scheduled & event triggers are fetched from database for delivery
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7651
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
GitOrigin-RevId: 3149dae41c6a8a16caa1d44fbc0606451d6d2cfa
2023-01-30 06:08:08 +00:00