Commit Graph

2217 Commits

Author SHA1 Message Date
David Overton
3e83370c96 Fix parsing of scalar types in the DataConnector backend
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9596
GitOrigin-RevId: 0161814a6678b67187147fcfa18d20523e480a9d
2023-06-21 06:50:51 +00:00
Gil Mizrahi
f5f3367f31 include int in the like of pg types mapping and massage input
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9588
GitOrigin-RevId: 79881c0c75423de44a0bde7fba7f1379fbfa9016
2023-06-20 08:40:59 +00:00
pranshi06
3124c93673 server: configurable header length limit for warp
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9363
GitOrigin-RevId: 8dd1e6a5f51d86ed20123c7ed7d42906fe5251bb
2023-06-19 12:34:35 +00:00
Daniel Harvey
51aca1639a chore(server): stop duplicate relationships in native queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9577
GitOrigin-RevId: e3698f419bc3c5e801863e66c5d2f66bd3d0f7e9
2023-06-19 09:58:02 +00:00
Daniel Chambers
27b13fb679 Add initial basic group_by IR and GraphQL parser support
[GDC-1254]: https://hasurahq.atlassian.net/browse/GDC-1254?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9571
GitOrigin-RevId: daa68115fe577a56842a08c13728c821425a0aef
2023-06-19 05:06:21 +00:00
Daniel Harvey
98fdeda54e fix(server): skip insert when no values provided for SQLServer
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9564
GitOrigin-RevId: 7d95ee428b8da7e246d9f1040f04d8abe359b667
2023-06-16 08:48:48 +00:00
Philip Lykke Carlsen
9c2c5f6d91 refac: Handle feature flags per product
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9527
GitOrigin-RevId: 8babe4f4f28f76278d6242148b3c657112ca7745
2023-06-15 11:50:33 +00:00
Daniel Harvey
59a967cb8e chore(server): support all BigQuery types in docs page
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9557
GitOrigin-RevId: b567fa72180df5f5e46037d362d5ba3806aa5f72
2023-06-15 10:21:13 +00:00
David Overton
dd34fb85ab Be more lenient about missing values in data connector response
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9532
GitOrigin-RevId: f237a237fe5453338b71ead98fca38bb037676b0
2023-06-15 01:33:26 +00:00
Gil Mizrahi
d7ae3911c4 validate a few properties when adding a new native query or logical model
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9543
GitOrigin-RevId: a6d962c70266799b8da4ef5ce5423f0f17316fed
2023-06-14 20:45:27 +00:00
Philip Lykke Carlsen
5d76f9cabf Feat: No feature flags for Native Queries and Stored Procedures
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9541
GitOrigin-RevId: 81a33de3a35405c6e45cb5bad160ad00871745eb
2023-06-14 13:21:37 +00:00
Daniel Chambers
331e4e3d5d Stop swallowing data connector connection errors during schema cache building
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9533
GitOrigin-RevId: ce81cd4b7449db4f9f62caa98c888641aa27b3c7
2023-06-14 09:45:29 +00:00
Gil Mizrahi
e6ee9db169 trim a nq end to remove spaces and then semicolons
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9515
GitOrigin-RevId: 95e93d017ac9757a8088aea3015836b5d8236d66
2023-06-13 17:23:07 +00:00
pranshi06
45f2d8f52d server: forward null value to the remote schema when field type is nullable
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9460
Co-authored-by: Auke Booij <164426+abooij@users.noreply.github.com>
GitOrigin-RevId: 9449a679d66817d7bf9f401009a638b57cb58695
2023-06-13 15:04:40 +00:00
hasura-bot
0a418040c3 feat(server): optional args GQL argument
GITHUB_PR_NUMBER: 9497
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/9497

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8340
Co-authored-by: Wsevolod <31807671+kraftwerk28@users.noreply.github.com>
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: e436b171d88991b814cc6c7b3ed47df75795ac64
2023-06-13 14:16:40 +00:00
Tom Harding
d48493ff24 Move stored procedure validation into the schema cache builder
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9521
GitOrigin-RevId: a7fdfa67271df7477950ed0f2b3a68cdb38cc106
2023-06-13 13:31:06 +00:00
Tom Harding
1ffdf73583 Roll back broken schema caches when using atomic_bulk
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9486
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
Co-authored-by: Julian <118911427+julian-mayorga@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com>
Co-authored-by: Samir Talwar <47582+SamirTalwar@users.noreply.github.com>
Co-authored-by: Anon Ray <616387+ecthiender@users.noreply.github.com>
Co-authored-by: Rishichandra Wawhal <27274869+wawhal@users.noreply.github.com>
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
Co-authored-by: ananya-2410 <107847554+ananya-2410@users.noreply.github.com>
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: fa5a292a9a9e2e7d8477f72979ad172244f1ef23
2023-06-13 10:01:39 +00:00
paritosh-08
14b4de37f7 server: close subscriptions (with 1012) on metadata change
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9159
GitOrigin-RevId: 5ab25ef57782c126de8852f3546809feb66a9d44
2023-06-13 09:24:19 +00:00
Daniel Harvey
aeb8bc4c7a chore(server): fix types of BigQuery parameters
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9511
GitOrigin-RevId: f291814fab80060d83fabc34af918682c8108b7c
2023-06-12 17:13:12 +00:00
Tom Harding
be658e532c Fail to track logical models with invalid child logical models
[NDAT-719]: https://hasurahq.atlassian.net/browse/NDAT-719?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9474
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: 0234548c5fc56e3e9e2d5d291735d132c5963a14
2023-06-12 16:27:56 +00:00
Tom Harding
d864fff13f Move query validation into the schema cache building code
[NDAT-707]: https://hasurahq.atlassian.net/browse/NDAT-707?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9510
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 11474498c75bfe1eb1173fed1073cc0206d290a1
2023-06-12 14:57:41 +00:00
Auke Booij
a53ab33330 server: hotfix for wrong PG conn pool, broken metrics, etc
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9481
GitOrigin-RevId: 58aa470b94cc578ae86fff0ef49ceb9e479199d1
2023-06-12 12:14:57 +00:00
Anon Ray
c23320054d server: emit logs when stored introspection is used
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9472
GitOrigin-RevId: 9be2eaa9ebc5f39a7bb44a1fc2340acbd4074bcd
2023-06-12 08:53:05 +00:00
Daniel Harvey
d5467d8d3a chore(server): add track_logical_model and untrack_logical_model to bulk_atomic command
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9484
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: d10490be355e859396e20e2a4a66361ed9d01893
2023-06-12 06:52:39 +00:00
Rakesh Emmadi
89ca064db5 server: update the logic of fetching stored introspection and fix evaluating partial stored introspection
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9489
GitOrigin-RevId: e18a6d32c7dcf4d4af077c72cffb6e4498ef838f
2023-06-08 20:33:16 +00:00
pranshi06
1372a649df server: add support for ES-* ( ES256, ES384 and ES512) algorithms for signing the JWT
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9273
GitOrigin-RevId: e891a14e992e4345f5470e1e99dbfc21d9105c31
2023-06-08 09:27:42 +00:00
Toan Nguyen
4e990f5e58 server: fix the invalid CU memory limit allocation
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9398
GitOrigin-RevId: 105162ca352f600ff52f21cdff4dd8f515dd36b9
2023-06-07 09:22:51 +00:00
Tom Harding
2c5e89e5d8 Fix array relationship aliasing (good news)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9438
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: 14b225ad8c834f2aa9863cee951d39f203046282
2023-06-06 17:21:05 +00:00
Brandon Simmons
440a8664de server: Upgrade the HGE server to GHC 9.4.5
Upgrade to GHC 9.4.5, and update any tests.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8954
Co-authored-by: Mohd Bilal <24944223+m-Bilal@users.noreply.github.com>
Co-authored-by: Samir Talwar <47582+SamirTalwar@users.noreply.github.com>
Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com>
GitOrigin-RevId: 5261126777cb478567ea471c4bf5441bc345ea0d
2023-06-06 13:29:30 +00:00
Karthikeyan Chinnakonda
a0b2f29b93 server: generate streaming subscription field only when there is at least one cursor column accessible
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9399
Co-authored-by: Auke Booij <164426+abooij@users.noreply.github.com>
GitOrigin-RevId: bd7f3fe3e95609c1634d531b95981c8ba15fba4e
2023-06-06 12:04:47 +00:00
Anon Ray
05862a4327 server: store collected source introspection to DB
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9237
Co-authored-by: Puru Gupta <32328846+purugupta99@users.noreply.github.com>
GitOrigin-RevId: 77327742db2f8440fdf770db5ae1c034cbb06e3b
2023-06-06 08:51:51 +00:00
Gil Mizrahi
15ce5196d0 throw an error on non-existing source in get_logical_model / get_native_query
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9421
GitOrigin-RevId: 2839e587c2966aa4580a631c3eff389c98b275df
2023-06-05 15:17:24 +00:00
Daniel Harvey
776a893eaa chore(server): non-nullable native query object relationships for SQLServer
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9405
GitOrigin-RevId: eda4fb38c9abc4a5d631964b8f80928d545a3694
2023-06-05 09:26:47 +00:00
Lyndon Maydwell
6487a44546 Adding function permissions to UDFs for Dataconnectors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9349
GitOrigin-RevId: 0b71d06a13ad78a55a205a5755260b060525d340
2023-06-05 05:29:53 +00:00
Daniel Harvey
22ff735370 chore(server): non-nullable native query object relationships for BigQuery
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9361
GitOrigin-RevId: e2af5f1a9761da7346d5913fcb25305dce378a7b
2023-06-02 15:20:10 +00:00
Sameer Kolhar
f04d2950f2 server: remove "__" prefixed types for schema-registry in the GQL Introspection
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9339
GitOrigin-RevId: d6d098ab8e126d0d64a83e3ddb0d22eb512b2d60
2023-06-02 12:46:59 +00:00
Tom Harding
b124c943a9 chore(server): allow recursive native queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9373
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: b998da0e2725f687a00c2c6c993435e44df4f70f
2023-06-02 10:37:55 +00:00
Samir Talwar
dd46aa6715 server: Preserve ordering when possible, and sort when it's not.
When upgrading to GHC v9.4, we noticed a number of failures because the sort order of HashMaps has changed. With this changeset, I am endeavoring to mitigate this now and in the future.

This makes one of two changes in a few areas where we depend on the sort order of elements in a `HashMap`:

  1. the ordering of the request is preserved with `InsOrdHashMap`, or
  2. we sort the data after retrieving it.

Fortunately, we do not do this anywhere where we _must_ preserve order; it's "just" descriptions, error messages, and OpenAPI metadata. The main problem is that tests are likely to fail each time we upgrade GHC (or whatever is providing the hash seed).

[NDAT-705]: https://hasurahq.atlassian.net/browse/NDAT-705?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9390
GitOrigin-RevId: 84503e029b44094edbbc298651744bc2843c15f3
2023-06-02 09:31:26 +00:00
Daniel Chambers
d421cdb726 Put the message property first when encoding error JSON
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9379
GitOrigin-RevId: 385035810190786f54a1db86e3a2e4a2c3bd5dee
2023-06-02 05:29:50 +00:00
Rakesh Emmadi
427ca18e85 server: collect remote schema and database introspections while building schema cache
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9297
GitOrigin-RevId: 143f50be2eba382d129669e26ef3a7eb24c921ca
2023-06-01 16:34:31 +00:00
Gil Mizrahi
3ce1b414b4 NativeQueries: validate that there are no unused or undeclare arguments
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9357
GitOrigin-RevId: 9d0ac74c8a2780c6d1b3e7769c3d4775bacb2d8d
2023-06-01 09:15:48 +00:00
Philip Lykke Carlsen
df10ccf310 fix(pg): Support aliased fields for Native Query object relations
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9374
GitOrigin-RevId: 073e51480e2be97e32938fa61a3547374e04ead8
2023-05-31 15:42:50 +00:00
Philip Lykke Carlsen
363e158bc4 refactor: Rename 'Provenance(Unknown)' to 'Provenance(FreshVar)'
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9376
GitOrigin-RevId: 3ef6572208ebc7770549d2b1cee16eb5086b56cf
2023-05-31 13:45:48 +00:00
Daniel Harvey
7d011644ac chore(server): allow non-nullable NQ -> NQ object relationships
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9353
GitOrigin-RevId: 9da95675d224f3045509592c2515b7afa2500d00
2023-05-31 10:34:28 +00:00
Daniel Chambers
bfd046b224 Add additional tracing spans to HGE GraphQL queries and the Super Connector
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9332
GitOrigin-RevId: ecde2383a42acf93fa8c6abb8bbd4c3b074b77fb
2023-05-31 05:49:12 +00:00
Daniel Harvey
9de3db4729 chore(server): respect logical model array nullability
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9303
GitOrigin-RevId: 4d38a125a6889e2b0be34905e21a78036a77881e
2023-05-31 00:15:47 +00:00
David Overton
26dfa3e718 Replace TableObjectType, etc. with the corresponding Logical Model types
## Description

This is the first step in making use of Logical Models with document databases such as MongoDB. As part of schema introspection, a data connector agent can supply a set of custom types that can be used to describe the schema for columns within the tables of the database (or _fields_ within a _document collection_ in MongoDB terminology).

Previously, we were storing these custom types as `TableObjectType`s within the `TableCoreInfo` for each table.

In this PR we
- replace the `TableObjectTypes` with `LogicalModel` types
- store these directly within the `DBObjectsIntrospection` instead of within the `TableCoreInfo` for each table. (The custom types are shared at the source level so there was no reason to have a separate set of types for each table.)
- When building the `SourceInfo`, we combine the `LogicalModel`s from `DBObjectsIntrospection` with `LogicalModel`s from the user's metadata to create the set of `LogicalModels` in the `SourceInfo` within the `SchemaCache`. I.e. we combine the set of types obtained by database introspection with the set of types specified by the user in the metadata. If two types have the same name, we use the type defined in the metadata.

## Limitations and future work

- Provide a way for the user to associate a meta-data defined `LogicalModel` with a table instead of requiring one to be provided by DB introspection
- Provide a way for the user to edit the  `LogicalModel` types provided by introspection and add them to the metadata.
- Allow a `LogicalModel` object type to describe and entire table rather than just individual columns.
- Better handling for "unknown" types, e.g. if the type of a collection (or part of a collection) is unknown we should treat it as a JSON scalar value. This may also involve adding an `_everything` field which returns the full document as a JSON scalar.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9345
GitOrigin-RevId: 5cec72fc1be1380d8600f7be547bbf71aad770bd
2023-05-30 14:05:46 +00:00
Gil Mizrahi
2c3663b706 Catch ErrorCall in runHandler and expose it as a message with status 200
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9340
GitOrigin-RevId: b18fe167c8d26027d70da239606bd66d61e9bb43
2023-05-30 12:32:45 +00:00
Gil Mizrahi
7c1ab39637 bugfix: quote columns in postgres nq validation
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9337
GitOrigin-RevId: e8e4c23efe9e3a028596f485d8e6f966b0c1a30a
2023-05-29 12:40:40 +00:00
Karthikeyan Chinnakonda
318bffa28d Fix performance regression introduced in #8922
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9310
Co-authored-by: Sameer Kolhar <6604943+kolharsam@users.noreply.github.com>
Co-authored-by: paritosh-08 <85472423+paritosh-08@users.noreply.github.com>
GitOrigin-RevId: 82697ea7d0f4a5cc39f05938f92a7ba49d9b6098
2023-05-29 07:06:18 +00:00
Philip Lykke Carlsen
cce7239da3 feat(BigQuery): Add object relationship support for Native Queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9302
GitOrigin-RevId: 9bf623bdbca33a5919f3c7834d9b6605119fa8cb
2023-05-25 16:15:38 +00:00
Daniel Harvey
39396c50b8 feature(server): comparable computed field aggregations for Postgres
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9300
GitOrigin-RevId: 92e4afaf2c029304e9ddb1d9541aa78c2b9b3027
2023-05-25 12:55:29 +00:00
Daniel Harvey
090a41ebf4 Move Logical Model parsers to Hasura.LogicalModel.Schema
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9298
GitOrigin-RevId: 8a4fdff7381495c94eede9d91437b635c8a60eac
2023-05-25 12:30:32 +00:00
Tom Harding
3492484034 Implement get_table_info for Postgres, Citus, and Cockroach
[NDAT-621]: https://hasurahq.atlassian.net/browse/NDAT-621?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9201
GitOrigin-RevId: 91886f5f8d125d49c35647cfbfc3c6621d932761
2023-05-25 09:32:12 +00:00
Lyndon Maydwell
bd513ea704 Adding functionCommands to DC API for UDF Incrementaion Function APIs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9288
Co-authored-by: Brandon Martin <40686+codedmart@users.noreply.github.com>
GitOrigin-RevId: b7242146480ff38a53cfdf95b1a44d44cbd37c5b
2023-05-24 22:36:25 +00:00
Gil Mizrahi
209fec7bb1 fix: nq relationships - throw an error instead on unexpected relationship
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9282
GitOrigin-RevId: 82ffda0d93de976181bae7befa9b62868355cd16
2023-05-24 14:37:57 +00:00
Tom Harding
e0c0043e76 Upgrade Ormolu to 0.7.0.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9284
GitOrigin-RevId: 2f2cf2ad01900a54e4bdb970205ac0ef313c7e00
2023-05-24 13:53:53 +00:00
Krushan Bauva
e3df24507d server: add dynamic labels trigger_name and source_name to existing event trigger metrics
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9265
GitOrigin-RevId: 6fb6504f1a476ea6c8b810e067770920757e8dc6
2023-05-24 13:23:43 +00:00
Sameer Kolhar
6d27ad97ae server: send request to schema_registry service every time the GQL schema is updated
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8922
Co-authored-by: Naveen Naidu <30195193+Naveenaidu@users.noreply.github.com>
GitOrigin-RevId: a0f3b0c2b2d039e9137ff816b41611e239ed2201
2023-05-24 12:51:19 +00:00
David Overton
e5f88d8039 Nested array support for Data Connectors Backend and MongoDB
## Description

This change adds support for querying into nested arrays in Data Connector agents that support such a concept (currently MongoDB).

### DC API changes

- New API type `ColumnType` which allows representing the type of a "column" as either a scalar type, an object reference or an array of `ColumnType`s. This recursive definition allows arbitrary nesting of arrays of types.
- The `type` fields in the API types `ColumnInfo` and `ColumnInsertSchema` now take a `ColumnType` instead of a `ScalarType`.
- To ensure backwards compatibility, a `ColumnType` representing a scalar serialises and deserialises to the same representation as `ScalarType`.
- In queries, the `Field` type now has a new constructor `NestedArrayField`. This contains a nested `Field` along with optional `limit`, `offset`, `where` and `order_by` arguments. (These optional arguments are not yet used by either HGE or the MongoDB agent.)

### MongoDB Haskell agent changes

- The `/schema` endpoint will now recognise arrays within the JSON validation schema and generate corresponding arrays in the DC schema.
- The `/query` endpoint will now handle `NestedArrayField`s within queries (although it does not yet handle `limit`, `offset`, `where` and `order_by`).

### HGE server changes

- The `Backend` type class adds a new type family `XNestedArrays b` to enable nested arrays on a per-backend basis (currently enabled only for the `DataConnector` backend.
- Within `RawColumnInfo` the column type is now represented by a new type `RawColumnType b` which mirrors the shape of the DC API `ColumnType`, but uses `XNestedObjects b` and `XNestedArrays b` type families to allow turning nested object and array supports on or off for a particular backend. In the `DataConnector` backend `API.CustomType` is converted into `RawColumnInfo 'DataConnector` while building the schema.
- In the next stage of schema building, the `RawColumnInfo` is converted into a `StructuredColumnInfo` which allows us to represent the three different types of columns: scalar, object and array. TODO: the `StructuredColumnInfo` looks very similar to the Logical Model types. The main difference is that it uses the `XNestedObjects` and `XNestedArrays` type families. We should be able to combine these two representations.
- The `StructuredColumnInfo` is then placed into a `FIColumn` `FieldInfo`. This involved some refactoring of `FieldInfo` as I had previously split out `FINestedObject` into a separate constructor. However it works out better to represent all "column" fields (i.e. scalar, object and array) using `FIColumn` as this make it easier to implement permission checking correctly. This is the reason the `StructuredColumnInfo` was needed.
- Next, the `FieldInfo` are used to generate `FieldParser`s. We add a new constructor to `AnnFieldG` for `AFNestedArray`. An `AFNestedArray` field parser can contain either a simple array selection or an array aggregate. Simple array `FieldParsers` are currently limited to subfield selection. We will add support for limit, offset, where and order_by in a future PR. We also don't yet generate array aggregate `FieldParsers.
- The new `AFNestedArray` field is handled by the `QueryPlan` module in the `DataConnector` backend. There we generate an `API.NestedArrayField` from the AFNestedArray. We also handle nested arrays when reshaping the response from the DC agent.

## Limitations

- Support for limit, offset, filter (where) and order_by is not yet fully implemented, although it should not be hard to add this
- Support for aggregations on nested arrays is not yet fully implemented
- Permissions involving nested arrays (and objects) not yet implemented
- This should be integrated with Logical Model types, but that will happen in a separate PR

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9149
GitOrigin-RevId: 0e7b71a994fc1d2ca1ef73bfe7b96e95b5328531
2023-05-24 08:02:43 +00:00
Daniel Chambers
f77b6aaa1d Data Connectors: Support using array literals in permission checks
[GDC-868]: https://hasurahq.atlassian.net/browse/GDC-868?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9238
GitOrigin-RevId: 93593f79a4a6a92eec1d0dc10fd8e5bb21bd123e
2023-05-24 04:42:02 +00:00
Divi
318f297e82 server: collect oss resource usage metrics
[INFRA-867]: https://hasurahq.atlassian.net/browse/INFRA-867?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9240
GitOrigin-RevId: bafe69b96e8f44c8030a4c219bd84206faeb85f5
2023-05-24 02:44:12 +00:00
Puru Gupta
46451cf114 server: fetch and use stored introspection during Schema Cache (re)builds
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9272
GitOrigin-RevId: 08d7767489912ca1420453f5dda0e440352a19c0
2023-05-23 21:05:19 +00:00
Tom Harding
ec63ea6ed0 Use the backend-agnostic get_table_info for GDCs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9186
GitOrigin-RevId: 08f0772139f155918cbc136392cf9869db4c6332
2023-05-23 16:49:45 +00:00
Tom Harding
84ff37f8fb Numeric Aggregation of Postgres Computed Fields
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9210
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: c9f7f36e4a93ac2a2669590fe9ba83bb63a1f7ea
2023-05-23 14:48:03 +00:00
Brandon Simmons
230e8a8cad INFRA-830: add prometheus metric corresponding to /healthz/sources
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9134
Co-authored-by: awjchen <13142944+awjchen@users.noreply.github.com>
GitOrigin-RevId: 03f2aa72757d405b314c252234e0cd81787c3948
2023-05-22 15:21:48 +00:00
Daniel Harvey
a73a009031 chore(server): more expressive logical models
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9197
GitOrigin-RevId: 3471c68d4e59310bdb62ecb3694ab30a2094916e
2023-05-19 16:14:20 +00:00
Gil Mizrahi
0623fb659a native queries(mssql): support object relationships
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9224
GitOrigin-RevId: 0016fe43dbdc7d42e56d8a9057c4c38bffdd14e1
2023-05-19 15:43:14 +00:00
Krushan Bauva
8a9fa8d567 server: fix event fetching API bugs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9216
GitOrigin-RevId: a944251e59e5ddcd499f2894763dc14fa85f8501
2023-05-19 12:53:23 +00:00
Lyndon Maydwell
cb8e6feb2e Adding UDF (user-defined-functions) support to Data Connectors - GDC-820
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8121
GitOrigin-RevId: ceb3e29e330bba294061f85c1f75700974d01452
2023-05-19 04:48:46 +00:00
Naveen Naidu
770407110c server: add total time, db exec time subscription metrics
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8899
Co-authored-by: paritosh-08 <85472423+paritosh-08@users.noreply.github.com>
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: c8c4a89576ae95265a8e4f4e6803a12ba7e840d4
2023-05-18 12:57:26 +00:00
Daniel Chambers
605f0281dc Add untrack_tables metadata API
[GDC-1198]: https://hasurahq.atlassian.net/browse/GDC-1198?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9181
GitOrigin-RevId: 0ff4acae990476f93d11829173e0e4f31e8db04e
2023-05-17 15:31:56 +00:00
Daniel Harvey
42817af958 chore(server): split NamingCase type from functions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9184
GitOrigin-RevId: caf36bdaa6c739855153b33a0f130b3f2dda6c0a
2023-05-17 14:03:40 +00:00
Auke Booij
a6eaeceabe server: support caching when forwarding client headers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9021
Co-authored-by: Anon Ray <616387+ecthiender@users.noreply.github.com>
GitOrigin-RevId: d82eaee50d6bb5bbb2c01f2900875ba8ab73a1b0
2023-05-17 09:22:52 +00:00
Daniel Harvey
8f4692d871 chore(server): move table related things to Hasura.Table.*
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9174
GitOrigin-RevId: d440647ac04b9c1717ecf22a2dbfb8c5f22b7c7a
2023-05-17 08:55:32 +00:00
Tom Harding
6695204d90 Implement get_table_info for GDC backends
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9176
GitOrigin-RevId: 88e75233b0c0fe2fa5077f1d1f4b2b2cbc0b6b37
2023-05-17 08:04:55 +00:00
Daniel Harvey
48d4882b6c chore(server): NQ -> NQ array relationships for SQLServer and BigQuery
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9166
GitOrigin-RevId: ac713d50059737728796d89ee5bc8f907cf85ff8
2023-05-16 17:40:56 +00:00
Rakesh Emmadi
79d2e20e69 server: use stored introspection only when upstream remote schema unreachable
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9074
GitOrigin-RevId: e0dcdbcab0691e680fa7c8e0df4afe38aa2a7504
2023-05-16 17:03:10 +00:00
Tom Harding
56a015fdfd Introduce Backend::getTableInfo
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9172
GitOrigin-RevId: 4c90f250d0172fd911eadbe5bbd6949770139cd0
2023-05-16 16:29:38 +00:00
Daniel Harvey
0fce0099b8 chore(server): use generics over TH in Hasura.Eventing
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9143
GitOrigin-RevId: ed11588db37f5336698fc33f50066e75fa7f73a1
2023-05-16 15:53:37 +00:00
Daniel Harvey
ce1e068813 chore(server): remove NQ -> table relationships
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9170
GitOrigin-RevId: 01258fbcde8471c1b693b06d37c3242fe4909107
2023-05-16 15:09:18 +00:00
Auke Booij
3d77697664 server: Make StoredIntrospection hold EncJSON rather than structured data
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9157
GitOrigin-RevId: 788bd1012642164ec034e7c7c1059063671d6d75
2023-05-16 12:41:41 +00:00
Daniel Harvey
db8f3b4a28 chore(server): Native Query array -> array relationships
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9152
GitOrigin-RevId: f6aceb4a86a782d72d836afd65fb6ad73d19e7d7
2023-05-16 08:37:05 +00:00
Puru Gupta
d55c664d83 server/pro: add prometheus metrics for caching
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9140
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: 945a6e650f8b8f1b04647d6f5a632ce767298229
2023-05-16 07:38:36 +00:00
Daniel Chambers
c664e1fbba Add track_tables metadata API
[GDC-1198]: https://hasurahq.atlassian.net/browse/GDC-1198?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9120
GitOrigin-RevId: bb86acaf8b06529a34113a80c3fe2409c3d69a63
2023-05-16 04:05:02 +00:00
pranshi06
0e6811d9df server: add HTTP response status in the Kriti context for Actions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9125
GitOrigin-RevId: d0d35d1f9fa5ec04b42132007e2905087349fbd6
2023-05-15 16:35:22 +00:00
Anon Ray
c963b4b46f server: methods for loading and storing source introspection
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9087
GitOrigin-RevId: 702c29b09ea880c7b37b1979b60c18dae39ed8cf
2023-05-15 15:58:43 +00:00
Krushan Bauva
ca0f007bc3 server: add new metric hasura_events_fetched_per_batch
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9121
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: 3b68c1ec192c55f1fb765a8887271276e22f7bdd
2023-05-15 15:06:39 +00:00
Daniel Harvey
2b1fe6fdf9 chore(server): remove nqArgs from Native Query IR
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9142
GitOrigin-RevId: 00e29847cd1e8c0562ac7d862bbc072389d40e3a
2023-05-15 14:36:55 +00:00
Daniel Harvey
308948d6b4 chore(server): ensure correct introspection types for NQ relationships
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9133
GitOrigin-RevId: 7d352aa5495098ff91d1bbc1a06c6b1e71ce660e
2023-05-15 08:12:45 +00:00
pranshi06
2011f4cf37 server: time related modelling in Event Triggers for Postgres sources
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8846
GitOrigin-RevId: f9d99e3368f5722a8dbfc8aa037cd1f3971c4b98
2023-05-11 09:01:29 +00:00
paritosh-08
ae49a3f9db server: add the env var for toggling metric granularity
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9034
GitOrigin-RevId: 24a4ae932b7467a53060025e2772edbebaf94b5b
2023-05-11 05:21:16 +00:00
Daniel Harvey
bccab82398 Expose launch darkly feature flags in v1alpha1/config endpoint
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9109
GitOrigin-RevId: b4f95139c6d85638fe5c301a7466bd318445aabf
2023-05-10 15:51:50 +00:00
Daniel Harvey
2aca76f0cc chore(server): native query postgres array relationships
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9037
GitOrigin-RevId: c47ed4bd2fb7102ceed0159c4717d1555080cfd5
2023-05-10 15:20:23 +00:00
Daniel Harvey
3ce9c0f4c3 chore(server): Replace Aeson TH with generics in Hasura.Backends.*
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9097
GitOrigin-RevId: 0cbca27f4535358f86438b74c7e871c4fe03f2c2
2023-05-09 18:21:00 +00:00
Daniel Chambers
89e3cca8b3 Use sets instead of lists in the Data Connector API types where the order of the list is irrelevant
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9089
GitOrigin-RevId: 292f68a4b44ed75ae6e336da57f02f40e6ded26f
2023-05-09 16:51:10 +00:00
Daniel Harvey
0da011f272 chore(server): move Lenses into RQL.IR.Select.Lenses
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9096
GitOrigin-RevId: 09d69af150f66309b523133c70364f96de40d9cb
2023-05-09 16:22:53 +00:00
Daniel Harvey
a51856c159 chore(server): resolve Native Query object relationships in schema cache
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9092
GitOrigin-RevId: 9c46188f0bc613e553c9e9c267a189efb1de8464
2023-05-09 15:50:13 +00:00
paritosh-08
a81010d36d server: ignore null form encoded value in action
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9072
GitOrigin-RevId: d89812ad9f32d65b39137f0213ba91e7eae97be3
2023-05-08 08:28:22 +00:00
Gil Mizrahi
181f780273 WIP IN PROGRESS Query for postgres dc
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9071
GitOrigin-RevId: 863417976f6c2483ba092a8e8d660dfea8aca0a4
2023-05-05 16:31:13 +00:00
Tom Harding
457127a6e2 Remove TemplateHaskell Aeson instances from RQL.Types
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8997
GitOrigin-RevId: 741318f65281af7b26a616260baf3a9953707007
2023-05-05 14:38:00 +00:00
Anon Ray
c8df4ec8fb server/caching: collect all remote joins for caching check
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9064
GitOrigin-RevId: 6ad2bfacd2c02e496c7348ec90d281ab8eb84b01
2023-05-05 13:52:07 +00:00
Daniel Harvey
285a200a87 chore(server): delete MySQL native backend
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9050
GitOrigin-RevId: 1515fb0efdb1baa05ffe3ff7cf6f230acd0cde29
2023-05-05 10:32:56 +00:00
Daniel Harvey
1181ca78a3 feature(server): metadata for native query -> native query object relationships
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9026
GitOrigin-RevId: 5a0528ed48f6e0d2e9a3e7f5d3090a0208dad3e1
2023-05-04 14:33:06 +00:00
Gil Mizrahi
d432eb4d3d Use a separate feature flag for stored procedures
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9040
GitOrigin-RevId: f577f34fd773cbc886546d7866e5a77603087a37
2023-05-04 12:45:37 +00:00
Tom Harding
7617355aa9 Remove feature flag on logical models
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8998
GitOrigin-RevId: 2cde88c5d595860aa97a5c8480442a1ff64a4360
2023-05-04 12:09:39 +00:00
Samir Talwar
397e95fc6a Upgrade Citus to v11.3.0 in tests.
Upgrades Citus to v11.3.0 in tests.

This breaks an assumption made by the tests for the `get_source_tables` metadata API, in which data is expected to be ordered. We fix it by explicitly ordering rather than relying on the goodwill of the database.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9039
GitOrigin-RevId: ee86db7e1c264d5009bb0203ac2f3fb2cda7b39f
2023-05-04 11:40:10 +00:00
Daniel Harvey
e62339d20c feat(postgres data connector): Adding initial support for /Schema
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9018
Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com>
GitOrigin-RevId: 4330c1201bac790b370d3d53d915f8ffe00ba0c9
2023-05-03 21:12:45 +00:00
Philip Lykke Carlsen
c7d4117964 fix: Properly scope root-table references in relations
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8976
GitOrigin-RevId: bbb54468f04e1df1d595691ccb21a9d28a4eb010
2023-05-03 10:30:23 +00:00
Gil Mizrahi
56e3bd182a chore(refactor): extract common functionality between stored procedures and native queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9028
GitOrigin-RevId: ab5c1ca9c08600a758f07aa81370930c305d6b40
2023-05-03 10:00:56 +00:00
pranshi06
1de2bf7d70 server: improve logging around HTTP Exception errors for Actions and Remote Schemas
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8937
GitOrigin-RevId: fb6b3a4786cf5ffd42bf608c7743d5b8852cbf47
2023-05-03 07:56:37 +00:00
Rakesh Emmadi
4937444142 server/multitenant: accept connection parameters for introspection storage database
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8996
GitOrigin-RevId: 302745a90ecfdad10d87d0be63e6010edfca508b
2023-05-02 14:00:38 +00:00
Gil Mizrahi
e8d2d4f364 Refer to a stored procedure by name in commands interface
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9014
GitOrigin-RevId: 64f51811770d88ad6d5b298fc4c71170ffd7182c
2023-05-02 13:32:01 +00:00
Gil Mizrahi
e010781098 chore(refactor): rename NativeQueryArgumentName to ArgumentName
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9012
GitOrigin-RevId: fa45f7a01f4fa1f3f1bb6c3057f32839bab453ca
2023-05-02 12:55:57 +00:00
awjchen
650137dc00 server: respect X-B3-Sampled header when X-B3-TraceId is not present
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9009
GitOrigin-RevId: 7a4565bcada4f6249927ed0cbfbe42401a9a7968
2023-05-02 07:22:53 +00:00
Gil Mizrahi
990fd54e8c Stored Procedures schema parsers and codegen
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9000
GitOrigin-RevId: 951a8b949359db11df183964b4ce217ae02a301c
2023-04-29 08:05:37 +00:00
Gil Mizrahi
f6fd9f071d refactor(cleanup): extract interpolated query
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9002
GitOrigin-RevId: 2e2a499f5035adf1493a2d675ee52abb7c87a8c8
2023-04-28 19:25:32 +00:00
Daniel Harvey
6178a1fd82 chore(server): split Logical Model lenses into files
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8989
GitOrigin-RevId: f0f6e75732408f21ebe5fdc5af3f680cd96ae789
2023-04-28 18:47:38 +00:00
Tom Harding
912a03ec23 Remove reference to custom types
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9005
GitOrigin-RevId: 8fa120187b6e351fbf10f4b80adf4d01c291fc30
2023-04-28 17:54:49 +00:00
Daniel Harvey
cb00535693 chore(server): add link-type to Logical Model references
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9004
GitOrigin-RevId: f361ca5f3b82995096f9289f8e90c7c20920a744
2023-04-28 16:48:19 +00:00
Gil Mizrahi
7aef17863a refactor(cleanup): extract nullablescalartype
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9001
GitOrigin-RevId: 5053e4c881f0d037b9170b434bcf533284a827a6
2023-04-28 16:16:08 +00:00
Daniel Harvey
5b2465f22a chore(server): move template haskell out of more Hasura.RQL folders
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8994
GitOrigin-RevId: a7aec36c87fe6a53d704c7a7fb6d625853914dda
2023-04-28 15:41:56 +00:00
Daniel Harvey
2e9b0ad3f2 chore(server): remove TH aeson, separate lenses, in Hasura.RQL.DDL
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8993
GitOrigin-RevId: dda6b7b915236c4f013b28ce98aa34c48e9a53db
2023-04-28 15:13:32 +00:00
Daniel Harvey
d0d80e621d chore(server): add telemetry for Stored Procedures
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8999
GitOrigin-RevId: 985cd0598f3fdc068bc06a0880d279ebc95e6930
2023-04-28 14:43:13 +00:00
Daniel Harvey
9a0c761b4a chore(server): remove Template Haskell from Hasura.Function
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8992
GitOrigin-RevId: a06cf33a96d6ef8ad2234a385016b5e68c46b8f2
2023-04-28 14:14:26 +00:00
Gil Mizrahi
930df62de7 Stored procedures api commands
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8975
GitOrigin-RevId: c71a9f74bf01bb8c0bc8c8cd4b744b530d99476a
2023-04-28 13:38:34 +00:00
Daniel Harvey
3a254ec471 chore(server): add Logical Models count to telemetry
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8977
GitOrigin-RevId: 933961ec1079231b728c3595392b2ff1e37b9fbc
2023-04-28 12:25:41 +00:00
Puru Gupta
832ba38b5f multitenant: fix to dynamically update the metrics endpoint
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8972
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: 474ce2351e715476ac8dcc08d43b9758cf8e7b33
2023-04-28 11:18:37 +00:00
Tom Harding
a1512b1bde Remove RQL.Types -> RQL.DDL dependencies
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8913
GitOrigin-RevId: 32b62ff7c1083161c96af98c3a4ec1a2e01af9ab
2023-04-28 10:48:15 +00:00
Daniel Harvey
a0b1d69392 chore(server): make native queries pro-only
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8926
GitOrigin-RevId: 68d2091c97ed80e86f851d656749eab865f73ec4
2023-04-27 14:31:53 +00:00
Daniel Harvey
800b6aa9be chore(server): copy pasta Stored Procedures
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8969
GitOrigin-RevId: 2a33ab836fc26619acbe160278c87d036253388d
2023-04-27 14:04:28 +00:00
Tom Harding
b6799f0882 Import InsOrdHashMap, not OMap, OM, Map, HM, ...
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8946
GitOrigin-RevId: 434e7c335bc69119020dd35761c7d4539bc51ff8
2023-04-27 07:43:22 +00:00
Tom Harding
4885a3fd9a Import J, not Aeson, A, JSON, Yaml...
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8948
GitOrigin-RevId: d70c4a50b94ffe7d42a1fb1017051d351f236acc
2023-04-26 17:30:24 +00:00
kodiakhq[bot]
bb8f6a76cc PLAT-438: improve traces from OpenTelemetry
[PLAT-438](https://hasurahq.atlassian.net/browse/PLAT-438)

After this change the top level trace is is annotated with `request_id` and `parameterized_query_hash`. It looks like this,  in jeager:

![image](https://user-images.githubusercontent.com/210815/233206107-73682a85-3306-4d1d-8a6c-148890dc1a38.png)

 bulk queries should output a separate `parameterized_query_hash` for each query span

...after the last two commits, things look like this (remove pointless spans, more attributes):

![image](https://user-images.githubusercontent.com/210815/233476532-47521f35-2cdf-4f7d-af13-39c7ce15c9ec.png)

[PLAT-438]: https://hasurahq.atlassian.net/browse/PLAT-438?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8824
GitOrigin-RevId: 0fd105c879161587d41b729b9bac968e92efae95
2023-04-26 16:21:29 +00:00
Tom Harding
7e334e08a4 Import HashMap, not HM, Map, M...
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8947
GitOrigin-RevId: 18e52c928e1df535579e2077b4af6c2ce92bdcef
2023-04-26 15:43:44 +00:00
Daniel Chambers
cb80942e4f Disable use of local relationships in metadata if Data Connector agents don't declare relationships capability
[GDC-489]: https://hasurahq.atlassian.net/browse/GDC-489?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8862
GitOrigin-RevId: cfff2d9c688185e00f4a830dbdbe173dba4ce7f0
2023-04-26 06:49:36 +00:00
Gil Mizrahi
858c0634f3 add QueryWithDDL back
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8906
GitOrigin-RevId: 5304e2a3ffa71ed13c3f706cdf64bcef84d7c0c1
2023-04-25 21:06:58 +00:00
Karthikeyan Chinnakonda
c19bc58f1e Server: Websocket queue time and pre subscriptions start errors metrics [Subscription metrics - 3]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8870
GitOrigin-RevId: 35cb1f1c7ffe7c8dcdd65fa14c423fcd1c2de234
2023-04-25 20:29:30 +00:00
Tom Harding
74f282ad16 chore(server): remove Eventing instances from RQL.Types
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8909
GitOrigin-RevId: 302a9583c3364d507dfe106111ffcabac0b1dbf5
2023-04-25 17:18:30 +00:00
Tom Harding
2a9575f922 Split Hasura.Session, remove RQL.Types dependency
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8921
GitOrigin-RevId: b3586942838be4d7a7d48b6b50c7e2643cd8fa06
2023-04-25 15:57:08 +00:00
Samir Talwar
be67b0db59 server: Make HLint pass, by hook or by crook.
This fixes the simple HLint warnings, and adds a few suppressions to avoid noise.

The suppressions don't really solve the problems, but I think the warnings here are quite benign and I'm uncomfortable with how likely I would be to introduce a bug during refactoring.

In the case of _pg-client_ and _resource-pool_, we can't use the recommended functions anyway, and there doesn't seem to be a way to tell HLint to ignore entire packages.

I have updated the `make` targets to only fail if errors or warnings are found, not suggestions. This brings it in line with the CI job.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8910
GitOrigin-RevId: 596277b4ae5833876fc3f43875208c1279518a59
2023-04-25 14:03:02 +00:00
Daniel Harvey
15ce4818b2 chore(server): fix Logical Model permissions for nested fields
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8889
GitOrigin-RevId: c86f5328170aaa40cc5bf469f5cbb98e01ac521d
2023-04-25 11:59:48 +00:00
Krushan Bauva
2a68a4ac18 server: API support for fetching events
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7587
GitOrigin-RevId: da9e77abe9e9eb0e414aaddccd021433cd40e604
2023-04-25 11:24:09 +00:00
Tom Harding
6a53470728 Break Metadata.DTO.Utils into Autodocodec.Extended and RQL.Types.BackendTag
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8874
GitOrigin-RevId: 77a8f61e1f5a5bb84908b5afd743a575e723d87f
2023-04-25 09:01:12 +00:00
Tom Harding
1a23e47818 Separate Hasura.EncJSON into its own package
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8875
GitOrigin-RevId: 9622bb67b6c357837db3e3a9f26e8e471ec7382c
2023-04-25 08:25:06 +00:00
paritosh-08
b158aae73b server: check for event triggers before throwing source-cleanup-failed warnings
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8885
GitOrigin-RevId: 7e02829608c6838f5db8226b532b436dd97f1b22
2023-04-24 19:52:50 +00:00
Daniel Harvey
ea5c92acae chore(server): move Hasura.SQL.Backend to Hasura.RQL.Types.BackendType
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8876
GitOrigin-RevId: abfc18eeef96a1f3593bfe823adab4d161161333
2023-04-24 18:37:33 +00:00
Tom Harding
de8e6c022d Move the GHC directory into hasura-extras
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8888
GitOrigin-RevId: 50cdb72293096faa2c6ab94fe40bbc59d232d4e1
2023-04-24 17:25:32 +00:00
Daniel Harvey
8cf134dad1 Split Hasura.RQL.DDL.Headers to put types in Hasura.RQL.Types.Headers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8873
GitOrigin-RevId: 566cb4271f0eb27e6688c2e0fbc26711bdf8baa9
2023-04-24 16:45:55 +00:00
Tom Harding
f8ae944dbc Move Hasura.GraphQL.Schema.Options to Hasura.RQL.Types.Options
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8877
GitOrigin-RevId: 8be82f60a57cd9582d6980a6dea2f34c7b0c13c1
2023-04-24 15:18:56 +00:00