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
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
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
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
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
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
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
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
Vishnu Bharathi
b543892617
ci: tag release v2.25.1
...
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9229
GitOrigin-RevId: 48ad076b9c0e6ab08d1b687d61ee4ec158b89e96
2023-05-22 06:52:52 +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
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
Vishnu Bharathi
70c230277a
ci: tag release v2.26.0-beta.1
...
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9213
GitOrigin-RevId: 81927bd7cfe8c743543d81ab33aa864e4e5f6fe4
2023-05-18 14:04:39 +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
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
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
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 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
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
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