Commit Graph

260 Commits

Author SHA1 Message Date
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
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
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
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
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
3151dd0074 Extract hasura-extras from graphql-engine
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8848
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: 4a667e2760f866e57e0e7d804815153571b413e6
2023-04-21 13:15:27 +00:00
Daniel Harvey
59244eac85 feature(server): basic array relationships on Native Queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8752
GitOrigin-RevId: adea2941e01c4037b74f6e8c9150ff0819729fae
2023-04-21 11:57:42 +00:00
Tom Harding
52c21832d8 Add an alias for EXISTS clauses in queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8537
GitOrigin-RevId: d931e4f32bef75dcba7cf8d370caa7539a7d3d8a
2023-04-20 12:34:51 +00:00
Gil Mizrahi
2635ed46bd sqlserver: implement native queries as CTEs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8818
GitOrigin-RevId: 78d84c3558b2cc27e1c1a6c025de4c5035a9cafe
2023-04-19 14:54:56 +00:00
Philip Lykke Carlsen
983fc2ad47 Rename "Custom Return Types" → "Logical Models"
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8800
GitOrigin-RevId: e5e10f31c6cc8953a8ee947441a7f80b0e9b5e5e
2023-04-19 09:05:25 +00:00
Daniel Chambers
91c88b2109 Properly return schema information about views and PK mutability from the Super Connector
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8786
GitOrigin-RevId: b7cd0dd5736a408a269819ea76dfbe53455060ee
2023-04-18 17:24:51 +00:00
Gil Mizrahi
5ed9fcc0a3 bugfix(NativeQueries): fix validation failed on name with uppercase on postgres
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8790
GitOrigin-RevId: f3b9b041fd96c6087ff4bd3379ef6283befcdc54
2023-04-18 16:09:45 +00:00
Daniel Harvey
2fd3f91398 chore(server): metadata changes for array relationships for Native Queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8670
GitOrigin-RevId: c23e23e3cf48013ab76fc2fa98c8b8b800c6cee6
2023-04-17 11:31:59 +00:00
Tom Harding
4c25eafc52 bulk_keep_going
[NDAT-604]: https://hasurahq.atlassian.net/browse/NDAT-604?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8770
GitOrigin-RevId: 597dbb1448794c0ac25496d6b6f759d5aaccc2fb
2023-04-13 17:00:45 +00:00
Philip Lykke Carlsen
0346224444 Rename "Logical Models" → "Native Queries"
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8769
GitOrigin-RevId: 66f2cbfb620d641e672a4074554d9d324a18c591
2023-04-13 16:12:20 +00:00
Tom Harding
d60136b4fb Create a schema dependency from logical models to their types
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8746
GitOrigin-RevId: 969685c87e7fcd3458da87a37a0a4589d6f85bc5
2023-04-13 09:56:29 +00:00
Daniel Chambers
56db8ec358 Data Connectors: Fix track_table not working if the table was created after schema cache was built
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8732
GitOrigin-RevId: e11a0ef6979d1d58a0b39dcd8fff48d446d3420f
2023-04-13 01:30:50 +00:00
Tom Harding
168037df02 Add a test for multiplexing logical models
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8720
GitOrigin-RevId: da435a5700929592eb95d49dbaa9b4531c10042e
2023-04-11 16:59:41 +00:00
Gil Mizrahi
5d518f62a9 cleanup(tests): remove the type class in logimo typechecking test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8698
GitOrigin-RevId: 367cbc38ee7260c499a42b249b94463f2235ae0f
2023-04-11 10:29:39 +00:00
Daniel Harvey
99b0139275 chore(server): variable renaming around custom return type permissions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8624
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 901db6df865ce0433399731f878c6f3a10cf6e87
2023-04-10 14:17:20 +00:00
paritosh-08
774075a709 server: add code field to warning object in metadata API responses
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8601
GitOrigin-RevId: 7034c0a04b87c44731680917aa3946084b705959
2023-04-06 02:41:24 +00:00
Tom Harding
3cef692dd7 feature(server): Get _all_ source tables
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8649
GitOrigin-RevId: 4bb9311d1d7ab4e8ee641bde5df2babcb1b8b306
2023-04-05 20:16:14 +00:00
Philip Lykke Carlsen
41a5092b97 refactor(tests): Support componentised Postgres fixtures, port SimpleObjectSpec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8607
GitOrigin-RevId: b068f7308fa8fa4b626aa2f9352da3965b03fa34
2023-04-05 18:05:37 +00:00
Rishichandra Wawhal
c6d65508b2 [feature branch] EE Lite Trials
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8208
Co-authored-by: awjchen <13142944+awjchen@users.noreply.github.com>
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
Co-authored-by: Toan Nguyen  <1615675+hgiasac@users.noreply.github.com>
Co-authored-by: Abhijeet Khangarot <26903230+abhi40308@users.noreply.github.com>
Co-authored-by: Solomon <24038+solomon-b@users.noreply.github.com>
Co-authored-by: gneeri <10553562+gneeri@users.noreply.github.com>
GitOrigin-RevId: 454ee0dea636da77e43810edb2f427137027956c
2023-04-05 08:59:09 +00:00
Daniel Chambers
fde4c0fae5 Enhance insert table schema with extra info and remove need for cached schema usage in Super Connector mutations
[GDC-643]: https://hasurahq.atlassian.net/browse/GDC-643?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8560
GitOrigin-RevId: 0e965da447eb6a5acf5a0f291f9e205882630e6e
2023-04-05 02:23:20 +00:00
Tom Harding
794690f30c Implement get_source_tables command for all backends
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8619
GitOrigin-RevId: 5e1b2c11775d801a77dc6d92de4c5abc1c9b8c60
2023-04-04 15:27:19 +00:00
Gil Mizrahi
352d8ff09c validate logical models custom return type against postgres
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8563
GitOrigin-RevId: 462a608e0e90d1923bc1d735257f4506825f5db1
2023-04-04 14:02:59 +00:00
Daniel Harvey
9c99bcb6f8 chore(server): move perms to custom return types
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8604
GitOrigin-RevId: ff024429b3f06e4867334665f35d4bd404a85cba
2023-04-04 12:46:51 +00:00
Tom Harding
4854d3ca21 Add extremely basic support for BigQuery JSON fields
[NDAT-501]: https://hasurahq.atlassian.net/browse/NDAT-501?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8614
GitOrigin-RevId: 24530130499174a1a02e0fb4510859fcfeed207d
2023-04-04 09:45:17 +00:00
Philip Lykke Carlsen
df12c7cf46 fix(api-tests): Ensure the test runner runs the logger cleanup function.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8602
GitOrigin-RevId: 7e07b8b0556a22edf4e058e23ff020cc5e8528f6
2023-04-04 09:01:44 +00:00
Gil Mizrahi
ed4f3b7406 feature(server): CockroachDB now supports distinct. Document and test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8596
GitOrigin-RevId: 3dbc5fccb1d4387041a5a80794158c4f50b70848
2023-04-03 11:51:22 +00:00
Tom Harding
7e06b30e4d Add metadata commands for custom return type permissions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8587
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: 660f2eda9cf1c7c612d66745064b3998c77804e0
2023-03-31 16:29:24 +00:00
Daniel Harvey
79682e0598 chore(server): move custom types out of logical models
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8565
Co-authored-by: Tom Harding <6302310+i-am-tom@users.noreply.github.com>
GitOrigin-RevId: 38bf56cc420a6c818a9ca7d6f846f5018535c808
2023-03-31 15:35:13 +00:00
Daniel Harvey
4905dc1675 chore(tests): pass BigQuery service account env var through to HGE
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8532
GitOrigin-RevId: 68e4c846e23369f476fa672b987d6769fad43cbf
2023-03-30 17:59:01 +00:00
Jesse Hallett
bd9f93eaef server: codecs for backend configs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8269
GitOrigin-RevId: 34330f383ca82fb159842a171a763c178b462788
2023-03-30 15:53:55 +00:00
Daniel Harvey
7227e96278 feature(server): custom return types as discreet metadata entity
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8556
Co-authored-by: Tom Harding <6302310+i-am-tom@users.noreply.github.com>
GitOrigin-RevId: b7dcbcf378279c3bf4c8d223174b90c2cb4b9e53
2023-03-30 15:15:11 +00:00
Philip Lykke Carlsen
ed813655f6 refactor(tests): late binding of shouldReturnYaml
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8558
GitOrigin-RevId: 5044f4c726b71760fdbb05b71a1fc79e4eaa8a31
2023-03-30 09:05:04 +00:00
Philip Lykke Carlsen
e40e89d2d7 refactor(test-harness): Split up and move Harness.Test.Schema
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8545
GitOrigin-RevId: 9069737c23a286b3cefab59714064beac1465295
2023-03-29 17:40:33 +00:00
Naveen Naidu
4e3dbed938 server: revert changes to created_at column of 'hdb_catalog.event_log'
This PR reverts the following two commits:
1. https://github.com/hasura/graphql-engine-mono/pull/8287
2. https://github.com/hasura/graphql-engine-mono/pull/8467

We are undoing a migration that was done on `hdb_catalog.event_log` table which was done in d4ae6a517da63f2f43567dc16fda135b3cd1d7e6 . And as such, users who were using event triggers on that version will come across the error:
```json
{"detail":{"info":{"code":"not-supported","error":"Expected source catalog version <= 3, but the current version is 4","path":"$"},"kind":"catalog_migrate"},"level":"error","timestamp":"2023-03-28T10:17:24.289+0530","type":"startup"}
{"code":"not-supported","error":"Expected source catalog version <= 3, but the current version is 4","path":"$"}
```
To fix these errors please run the following SQL on the source where event triggers were created on:
```
UPDATE hdb_catalog.hdb_source_catalog_version SET version = 3, upgraded_on= NOW();
ALTER table hdb_catalog.event_log ALTER COLUMN created_at SET DEFAULT NOW();
ALTER table hdb_catalog.event_invocation_logs ALTER COLUMN created_at SET DEFAULT NOW();
```

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8534
GitOrigin-RevId: b6bbcce0163c8beed80619d3cea056e643b8c180
2023-03-29 10:33:30 +00:00
Philip Lykke Carlsen
926d5ecdb0 feat: Handle logical models in metadata when the feature is disabled
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8443
GitOrigin-RevId: 4df0f62979dc78103b786b6f0f8ffcde6def0739
2023-03-28 11:57:11 +00:00
Daniel Harvey
2d9c8299c2 feature(server): add SQLServer logical models
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8388
GitOrigin-RevId: cbf813d1114cb03816003ba73788d33ac37f1473
2023-03-27 16:56:05 +00:00
Daniel Harvey
77d6058f3e chore(server): add basic Explain test for Logical Models
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8502
GitOrigin-RevId: 7cc64139d98155b94c0aadf16f8717881ea2add6
2023-03-27 15:21:42 +00:00
Daniel Harvey
305eebb3ab feature(server): add Logical Models support for CockroachDB
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8500
GitOrigin-RevId: 0205bd207843f50ad4fa12ad6e6c07d1f2740912
2023-03-27 14:00:07 +00:00
Tom Harding
b2f683f56d Logical Models for BigQuery
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8447
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
Co-authored-by: Nicolas Beaussart <7281023+beaussan@users.noreply.github.com>
Co-authored-by: Antoine Leblanc <1618949+nicuveo@users.noreply.github.com>
Co-authored-by: Varun Choudhary <68095256+Varun-Choudhary@users.noreply.github.com>
Co-authored-by: ananya-2410 <107847554+ananya-2410@users.noreply.github.com>
Co-authored-by: Matthew Goodwin <49927862+m4ttheweric@users.noreply.github.com>
Co-authored-by: Abhijeet Khangarot <26903230+abhi40308@users.noreply.github.com>
Co-authored-by: Puru Gupta <32328846+purugupta99@users.noreply.github.com>
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: ddef9d54bfad6b7d5dc51251dbe47eac43995da3
2023-03-24 15:17:03 +00:00
Tom Harding
fe140ee791 Remove Fixture.Options argument from api-tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8480
GitOrigin-RevId: a6dd5c6c2cc6274b7bd1694cf1100efa48e6bdbd
2023-03-24 13:59:35 +00:00
Daniel Harvey
e6da837dbf chore(tests): move postgres-specific queries to own Logical Model tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8462
GitOrigin-RevId: 4032a2eb6dbb63d04688747e28ad293c6963e696
2023-03-23 12:25:34 +00:00
Daniel Harvey
ebb571ef39 feature(server): metadata for SQLServer logical model
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8444
GitOrigin-RevId: 86cfd7adbf326560a0ec72034de3dcd9dcb5124c
2023-03-22 17:11:19 +00:00
Daniel Harvey
7e437fc32b feature(server): ordered columns in Logical Model return type
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8434
Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com>
GitOrigin-RevId: 4ebd569bef868e01b15583e4af90d583d6713da7
2023-03-22 16:35:56 +00:00
Philip Lykke Carlsen
a763eeeeb2 refactor: Componentizing Fixture
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8428
GitOrigin-RevId: 8295a85b4a42dc3821d100371de1f350ed97cda3
2023-03-22 09:55:48 +00:00