Commit Graph

541 Commits

Author SHA1 Message Date
Daniel Harvey
cb02a9a034 chore(server): add tests/support for inserting JSON arrays
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9704
GitOrigin-RevId: 4c2820c302d056bed92bf61e3670419c6da1563e
2023-06-29 09:50:36 +00:00
Naveen Naidu
a367525e68 server/postgres: delete input validation [experimental]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9666
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
GitOrigin-RevId: 5fa7702401065869c953b23c6734b9b367247634
2023-06-28 13:46:00 +00:00
Naveen Naidu
c30d4f0564 server/postgres: update input validation [experimental]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9665
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
GitOrigin-RevId: 35bd769281982833e86c5bb708b3edf5a040708b
2023-06-28 10:19:54 +00:00
Daniel Harvey
8e6ec8b60d feat(server): native Postgres array support
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9673
GitOrigin-RevId: 2dfbc07acf9da879910acfc9885bb7138b81e883
2023-06-28 08:47:59 +00:00
kodiakhq[bot]
d4e368324d chore(tooling): import ekg-prometheus into the monorepo
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9526
Co-authored-by: awjchen <13142944+awjchen@users.noreply.github.com>
Co-authored-by: paritosh-08 <85472423+paritosh-08@users.noreply.github.com>
GitOrigin-RevId: 131739ab8e68165453fd47d1eafcc7957ec6f411
2023-06-27 18:37:11 +00:00
Samir Talwar
699ba62def server: Rename "error-message" to "hasura-error-message".
There is already a library in Hackage called "error-message".

This breaks the Nix build as we end up overriding that library, which causes a change to any of its dependents.

Outside Nix, Shadowing isn't strictly a problem, but it's prudent to avoid it in case we accidentally end up with the other library in edge cases.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9679
GitOrigin-RevId: e3f54fd4e5eafec9b0a00128767daad0c8aeab72
2023-06-27 16:51:06 +00:00
Tom Harding
87abdf17a1 Allow __typename in BigQuery aggregate queries
[NDAT-532]: https://hasurahq.atlassian.net/browse/NDAT-532?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9677
GitOrigin-RevId: aae8a57461588c8ef8ace943ac7077445c05c4a5
2023-06-27 10:29:13 +00:00
David Overton
37560dde8f Dmoverton/schemaless capability
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9667
GitOrigin-RevId: 41b3928e976703633437ef14624ec00fb0a8498d
2023-06-27 05:49:03 +00:00
Philip Lykke Carlsen
d95435ad16 fix: Restore function of optimize_permission_filters
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9629
GitOrigin-RevId: 10584252fd97889c68813a21ac817238b0847a40
2023-06-26 15:43:00 +00:00
Naveen Naidu
4796a9dd69 server/postgres: insert input validation [experimental]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9620
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
GitOrigin-RevId: 345c3f763f8dd3397c999c5967af39192b944640
2023-06-25 13:48:10 +00:00
Philip Lykke Carlsen
dcbe839f3a test: test-harness improvements
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9656
GitOrigin-RevId: 5c300851668050f6964076ceb385fef56bd9aca7
2023-06-23 19:37:51 +00:00
Puru Gupta
f2fe9cfe3b server: add support for header resolution from env vars
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9509
GitOrigin-RevId: 818f747422c5444fcb55419729ad58d74b890d52
2023-06-23 08:39:28 +00:00
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
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
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
Gil Mizrahi
d1c1a992f5 include the response in the test-harness missing content-type assertion
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9562
GitOrigin-RevId: 2c30c85c2a7d97d2ae604f8f133f1beefbc2cacc
2023-06-15 13:42:04 +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
Daniel Harvey
32fd3b4be0 chore(api-tests): enable Jaeger tracing in all Native Database test setups
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9549
GitOrigin-RevId: c3a583bec1d02e23bd340b646ab6c7c1a72f931b
2023-06-14 17:19:06 +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
Samir Talwar
e16e70760a server/upgrade-tests: Avoid Docker host networking.
Instead, we update the metadata to point to the correct database URL each time we start HGE.

This means we can run the tests on macOS (and any other environment where Docker runs inside a VM).

I was hoping this would solve the issues we're seeing on CI too, but no such luck.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9528
GitOrigin-RevId: 32cbf65430462b4b0e59f5d644260f7c26c7135c
2023-06-13 22:30:26 +00:00
Daniel Harvey
d49c476176 chore(postgres-agent): implement dataset API
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9326
GitOrigin-RevId: 55f3e63dfcbc79474800b4a3dac00e0e9c82871f
2023-06-13 18:10:39 +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
Gil Mizrahi
9458893bc1 test stored procedures dont work in oss
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9517
GitOrigin-RevId: a33f9a0f0ad2ae82715269256fe997ad98bb1b72
2023-06-13 10:42:33 +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
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
Daniel Harvey
be252cddf7 chore(ci-info): fix various compiler warnings
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9461
GitOrigin-RevId: 2160bd10c5464fad34bb5b9057beaa718c58a2ae
2023-06-08 12:25:22 +00:00
kodiakhq[bot]
6f3359ae96 chore(tooling): import ekg-json into the monorepo
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9424
Co-authored-by: Johan Tibell <17277+tibbe@users.noreply.github.com>
Co-authored-by: Oleg Grenrus <51087+phadej@users.noreply.github.com>
Co-authored-by: Mikhail Glushenkov <47439+23Skidoo@users.noreply.github.com>
Co-authored-by: Eric Conlon <37287+ejconlon@users.noreply.github.com>
Co-authored-by: Brandon Simmons <210815+jberryman@users.noreply.github.com>
Co-authored-by: awjchen <13142944+awjchen@users.noreply.github.com>
Co-authored-by: Tom Harding <6302310+i-am-tom@users.noreply.github.com>
GitOrigin-RevId: f493865321da664cef45e5f56f33bb00ae03c713
2023-06-07 08:38:48 +00:00
Daniel Harvey
0c38a693ac chore(ci): Use hlint github action
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9434
GitOrigin-RevId: 2205da4c6384b89d31f830a5119514154019566d
2023-06-06 16:00:22 +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
Daniel Harvey
0aeb48992e chore(testing): index all queries for Native Query tests by backend type
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9416
GitOrigin-RevId: 7b10bd1f8e2cbb98ec86646d9f54b18ad42bf85c
2023-06-05 13:06:03 +00:00
Gil Mizrahi
d8a4d254f6 chore(tests): add a flag to trace the graphql commands sent to the server during a test.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9409
GitOrigin-RevId: 46d0c48b519bf32ddb9869a8a7af81aad302532b
2023-06-05 08:22:53 +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 Chambers
e2345fb3bb Fixes to HTTP request recording in the Data Connector agent test suite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9394
GitOrigin-RevId: 873dc4e8ec744013f8303d197a91ec499e6a9c66
2023-06-02 14:34:49 +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
Daniel Harvey
0034ae8892 chore(server): use new version of sandwich
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9386
Co-authored-by: Daniel Chambers <1214352+daniel-chambers@users.noreply.github.com>
GitOrigin-RevId: 008312c7550025cb44d515fa3d01796175b60e29
2023-06-02 02:00:41 +00:00
kodiakhq[bot]
34e172d576 chore(tooling): import ci-info-hs into monorepo
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9383
Co-authored-by: Shahidh K Muhammed <4124733+shahidhk@users.noreply.github.com>
Co-authored-by: Ajeet D'Souza <1777663+ajeetdsouza@users.noreply.github.com>
Co-authored-by: Brandon Simmons <210815+jberryman@users.noreply.github.com>
Co-authored-by: Vamshi Surabhi <6562944+0x777@users.noreply.github.com>
Co-authored-by: Auke Booij <164426+abooij@users.noreply.github.com>
Co-authored-by: Matthew Pickering <1216657+mpickering@users.noreply.github.com>
Co-authored-by: Antoine Leblanc <1618949+nicuveo@users.noreply.github.com>
GitOrigin-RevId: a7a210e2237f5adc63302b18403616c7c0aa39ca
2023-06-01 12:51:39 +00:00
Gil Mizrahi
b87506e87c chore(tests): output hge stderr in api-tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9384
GitOrigin-RevId: 5d78b59e12bf870a3cba81829dcf4d3e0d2aebf9
2023-06-01 11:43:38 +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
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 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
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
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
Daniel Chambers
7e4c24aea0 Fix WebSockets api-tests breaking for Data Connector backends
[GDC-1024]: https://hasurahq.atlassian.net/browse/GDC-1024?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9291
GitOrigin-RevId: f7a2306268fc1a22744dd9393ac17648551434b0
2023-05-25 07:06:28 +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
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
Lyndon Maydwell
4a38055e9e Adding default table return type to fibs functions in UDF API tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9270
GitOrigin-RevId: a08e991e60893aa18b370652fc993b437797ed3c
2023-05-23 23:23:54 +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
Daniel Harvey
680b41bcb5 chore(server): more accurate return types
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9271
GitOrigin-RevId: 87547d3dc3a8d7327f5fa6762828adfdda46f3cc
2023-05-23 16:18:48 +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
Daniel Chambers
d9d15265f0 Snowflake agent read-only datasets support
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9255
GitOrigin-RevId: ea0e806a00668435892edee0af54e3405e387418
2023-05-23 06:48:18 +00:00
Philip Lykke Carlsen
30fbdf2e83 feat(tests): Add support for heartbeat monitoring
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9212
GitOrigin-RevId: 38491ce24ae766533b55e0b402b883d3066618fe
2023-05-22 08:04:03 +00:00
Daniel Chambers
3df1eeae5e Rework Data Connector order by test to remove the need for the agent to support an additional capability
[GDC-1203]: https://hasurahq.atlassian.net/browse/GDC-1203?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9220
GitOrigin-RevId: d1b61c79b2df368c0a5e786816c3eaaf4bbb11ab
2023-05-22 00:59:19 +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
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
Gil Mizrahi
db5370bb62 test-harness: if server fails to start, throwTo main
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9206
GitOrigin-RevId: 0663121db8ee546799a4de6deae861740614afc5
2023-05-18 10:02:15 +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
Philip Lykke Carlsen
3c7fa7cca1 feat(tests-harness): Support api-tests using postgres-agent data connector
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9188
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: 3eda64bcfcaebfb3fcef6783a88a1a4d36dade43
2023-05-17 14:44:06 +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
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
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
Philip Lykke Carlsen
e73f997284 feat(test-harness): Maintain pools of hge processes
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9158
GitOrigin-RevId: 243e2d771cd8c31852b8b1959b006f27440f079d
2023-05-16 10:05:12 +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
Philip Lykke Carlsen
53841c98c9 refactor(test-harness): Make admin secret injectable
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9147
GitOrigin-RevId: e12138ad59fb690261e5b8e474d959623bce0826
2023-05-15 18:27:52 +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
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 Chambers
09d14cfc9d Disable Snowflake agent's relationships capability
[GDC-1189]: https://hasurahq.atlassian.net/browse/GDC-1189?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8934
GitOrigin-RevId: 2fa754f1a38b1b7c00ef1754354172f78eb18590
2023-05-09 01:15:47 +00:00
Samir Talwar
bc8c7406df Remove native MySQL dependencies and code wherever I found it.
This includes:

  - CI scripts
  - Cabal dependency lists
  - Dockerfiles
  - Docker Compose files
  - server test harness code

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9066
GitOrigin-RevId: 509d7931693c4755509d5b8e5bcf50b42cc24769
2023-05-05 22:20:55 +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
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
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
c1705a09df api-tests: Fix the error messages to match those reported by Citus v11.3.0.
I also pinned Citus to v11.3. This should hopefully stop us from being surprised with random test failures in the future. We will need to bump this every now and again.

I have updated the Makefile to standardize Docker commands, and made sure we start all the containers even when running tests for a single database, as we need to test cross-DB remote joins. This ensures `make test-citus` actually works and runs all tests.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9035
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: 9c36ab65eb05206bfddd639c257d6c5c5cedd2bd
2023-05-03 20:22:26 +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
Daniel Chambers
f445c34997 Reimplement MySQL/MariaDB dataset support in the Super Connector and enable mutation API tests in CI
[GDC-1064]: https://hasurahq.atlassian.net/browse/GDC-1064?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8962
GitOrigin-RevId: 64c18f52291d98859e273a238e2b1f567444c058
2023-05-03 03:27:41 +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
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
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
Samir Talwar
e3b46b78a9 server/upgrade-tests: Tests that ensure that HGE upgrades successfully.
These tests ensure that upgrading HGE preserves the GraphQL schema.

They do this by running two different versions of HGE against the same metadata, and ensuring that the GraphQL schema doesn't change.

We might find that in the future, we make an additive change that makes these tests fail. Improving the tests to allow for this is left as an exercise to whoever triggers it. (Sorry.)

Currently, we do this with:

  * an empty database (zero tracked relations)
  * the Chinook dataset
  * the "huge schema" dataset

The base version of HGE tested against can be overridden with an option. The version must be available on Docker Hub.

Further information is in the Haddock documentation.

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8982
GitOrigin-RevId: 97b4deda1e6fe1db33ce35db02e12c6acc6c29e3
2023-04-28 12:54:51 +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
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
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 Harvey
107db24caf chore(tests): Move Native Queries and Logical Models tests to api-tests-pro
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8936
GitOrigin-RevId: 9c170f2ce2de68818a9efe52266b47e87a7c4726
2023-04-26 11:05:32 +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
Daniel Harvey
c2424abd2e chore(server): add -fexpose-all-unfoldings in hasura-base and hasura-extras
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8890
GitOrigin-RevId: 3a028ea9e6f2e7d6829ceb411c460da1e971178b
2023-04-25 16:35:58 +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
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
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
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
Tom Harding
249beed7d9 Remove ODBC dependency in hasura-extras
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8882
GitOrigin-RevId: 08c756c042976adc14a028477e9d5f9c3dff5991
2023-04-24 13:26:11 +00:00
Tom Harding
eac27bbf13 Extract Network and Net into hasura-extras
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8855
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: 5bde8ff821739c37a2e4435b57a5a623bc66de42
2023-04-24 11:13:34 +00:00