Commit Graph

7723 Commits

Author SHA1 Message Date
Matthew Goodwin
8f0451ce42 storybook: Migrate stories from CSF-2 to CSF-3
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9236
GitOrigin-RevId: 262b9bf5070835f625c690673bf71f2fe9e49d20
2023-05-25 19:08:20 +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
Luca Restagno
5a2821bb01 Add console support for Snowflake UDFs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9268
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: 046afcab867c3a91aea989bed92de894f4b67b16
2023-05-25 14:05:11 +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
Anon Ray
2fc448d9a5 docs: move cache metrics page to last position in the sidebar
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9296
GitOrigin-RevId: 7ba30b3c03af3c35800dba185c9e154d2a93c9f9
2023-05-25 11:59:26 +00:00
Naveen Naidu
d8cbde20ab docs: event trigger observability and performance
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9263
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: ca2565b8559ef884129667f1c9d2ca310a30a55a
2023-05-25 11:56:08 +00:00
paritosh-08
3e3e73b81f docs: subscription observability and performance
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9254
GitOrigin-RevId: 464ae1c7b67ff8bcacdea899d2612d57ad8bf443
2023-05-25 11:08:13 +00:00
Nicolas Beaussart
e7f0a521b8 console: have better time and payload size estimation in graphiql
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9243
GitOrigin-RevId: 74ab50ed908da659246c4fada3742d33e0fa3cd2
2023-05-25 11:02:43 +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
Mihir A Khandekar
a7fa1befd8 console: update enterprise users query
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9292
GitOrigin-RevId: 692e2c66f6689426f5f9d369cc03b06978acfecf
2023-05-25 08:08:35 +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
Samir Talwar
f2fe9f9579 Nix: Upgrade Ormolu to v0.7.0.0.
This requires serious monkey-patching.

We start with v0.6.0.1, upgrade its `src`, and override dependencies to make the version constraints happy.

We build it with GHC 9.4 because it bundles text v2, which is required for Ormolu v0.5.3 and up. This means we can't just override the Hackage package; instead, we override the root-level package and use that directly.

Because of this, HLS will use the wrong Ormolu version. We can resolve this once we upgrade to GHC 9.4 *and* a version of hls-ormolu-plugin is released which supports this version of Ormolu (at the time of writing, only v0.5.x and older are supported).

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9289
GitOrigin-RevId: 438fe045bc74834d99b80b8822bfb609ac11ada1
2023-05-24 23:02:03 +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
Varun Choudhary
1a68d766fc console: add tolerance time in cron trigger e2e test
This PR adds e2e test for tolerance time in already existing cron trigger e2e tests.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9280
GitOrigin-RevId: e3159c89f39e74fb9feb5c332d1ba609f96939bd
2023-05-24 15:29:50 +00:00
Rishi Divate
bb290c38fe docs: GA readiness for MySQL, MariaDB and Oracle
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9252
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: 45abdb23b215e5cb6ae1628b8a42131f2df207ca
2023-05-24 14:44:26 +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
Vijay Prasanna
17f1e5ebb2 console: remove beta lables for mysql, oracle, mariadb & snowflake
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9278
GitOrigin-RevId: 731ffbe49a8e6c20535fe291e2d4e9c8c8984472
2023-05-24 12:21:13 +00:00
Tom Harding
10b773066a Run ormolu on the contrib directory
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9279
GitOrigin-RevId: 4b45fad3983394722034f9d8267a8bd0d2358453
2023-05-24 10:20:01 +00:00
Nicolas Beaussart
cad58e0c43 console: fix storybook lagging promises
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9132
Co-authored-by: Divi <32202683+imperfect-fourth@users.noreply.github.com>
Co-authored-by: Nicolas Inchauspe <710410+nicoinch@users.noreply.github.com>
GitOrigin-RevId: c92295b98c8db2b0ecc6f964b02f49820db4d77d
2023-05-24 09:57:29 +00:00
Rob Dominguez
25436bcea9 docs: add the dalles to gcp regions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9274
GitOrigin-RevId: 67a17c6d5902eec25ae70ab3cbe637073745d897
2023-05-24 09:12:43 +00:00
Nicolas Inchauspe
324dd8b1ad Fix monitoring tab
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9022
GitOrigin-RevId: e2c1cad5d419a827a36403d297d08cdeffd26160
2023-05-24 09:07:40 +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
Matthew Goodwin
87da15a596 console: native queries gardening
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9235
GitOrigin-RevId: 452d306613e5f57bdf209d55116162d9c2b6bdf0
2023-05-23 17:59: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
Praveen Durairaju
3d533bee61 move sample apps outside graphql-engine
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8904
GitOrigin-RevId: d0c3000dff8615ff48f33c6a8ebf083d055ac0c3
2023-05-23 15:40:29 +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
Varun Choudhary
eb401b5925 console: add tolerance time for cron trigger
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9262
GitOrigin-RevId: c6edda5ad28183253b03faabc32d090e44f1f163
2023-05-23 13:39:24 +00:00
Puru Gupta
0558910e6a docs: add cache metrics docs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9219
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: d2aa98ecd330ecf08df8db0b0310d1f1853f73be
2023-05-23 12:53:29 +00:00
Samir Talwar
39786d54d8 make: Use the Docker Compose file from pro when running pro tests.
Let's keep these separate.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9248
GitOrigin-RevId: cdcdbc0e32aee11d495ba12bf820a883ba39daa8
2023-05-23 10:15:20 +00:00
Luca Restagno
68100c440c Avoid numeric value to accept negative numbers
[DSF-394]: https://hasurahq.atlassian.net/browse/DSF-394?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9196
GitOrigin-RevId: af9bb5c9c11b18fe240e91c40f4c3bc1c08737ca
2023-05-23 08:59:38 +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
Aaysha
3ad90a439c console: fix Onboarding Wizard reloading to suit newly introduces exit states
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9245
GitOrigin-RevId: f38a5ffcf3a31725644dc9418b7902278a462ec0
2023-05-23 05:37:26 +00:00
Matthew Goodwin
f07eb54e48 console: PR #9214 revision
## PR Revision

The `auto-update-auto-merge` label was added and a commit was still local on my machine. Meant to include these commits as well into https://github.com/hasura/graphql-engine-mono/pull/9214 as a response to feedback from @beaussan

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9251
GitOrigin-RevId: 077e37db6c4b76cb023aced420c8838617c5fe95
2023-05-22 19:35:43 +00:00
Matthew Goodwin
995086231d console: Eslint allowExpressions for fragments, ignoreRestSiblings for unused vars
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9214
GitOrigin-RevId: 2018ca8223b10417c9c9b833481de76e905e796a
2023-05-22 19:05:39 +00:00
Rob Dominguez
c3a0b90033 docs: improve getting started
[DOCS-954]: https://hasurahq.atlassian.net/browse/DOCS-954?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9249
GitOrigin-RevId: e0230cb6406fa84062a40e2f18f100fa51459a05
2023-05-22 17:12:38 +00:00
Matthew Goodwin
e51d1cf936 storybook: fix lockup issue related to react-query invalidation
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9234
GitOrigin-RevId: 14beecb1626369f92362adb4d2c130b25ed53109
2023-05-22 16:38:37 +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
Samir Talwar
3287181cc4 Nix: Wrap GHC and HLS, specifically, to provide (DY)?LD_LIBRARY_PATH.
We clearly do need this environment variable (at least on macOS); otherwise GHC spits out a slew of errors along the lines of "cannot find libodbc.dylib".

However, adding it directly to the shell causes serious problems. Wrapping GHC should limit the damage.

We've seen similar issues on macOS.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9203
Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com>
GitOrigin-RevId: 9468d31e5b8ec86196809844842a1668386054bc
2023-05-22 14:16:12 +00:00
Samir Talwar
4b50704061 make: Set an admin secret for the Pro server.
Otherwise it won't run at all with a license key.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9246
GitOrigin-RevId: 2c80baac78d4e209dee15f86e93bc7f958e1d1e0
2023-05-22 13:53:50 +00:00
Rob Dominguez
adba27a472 docs: small fixes 05
[DOCS-978]: https://hasurahq.atlassian.net/browse/DOCS-978?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[DOCS-991]: https://hasurahq.atlassian.net/browse/DOCS-991?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9227
GitOrigin-RevId: ba80a85033b8e1696c908a22916221cd96b1e9c4
2023-05-22 13:21:52 +00:00
Varun Choudhary
a6c7f12ffc console: interaction test for allow-list storybook components
This PR has interaction tests for all allow-list storybook components.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9151
GitOrigin-RevId: dc8157f8abcf9696db8fd15181251531bfc02563
2023-05-22 10:08:08 +00:00