Commit Graph

239 Commits

Author SHA1 Message Date
Tom Harding
8dcc8f8fca Implement aggregation tests for hspec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5960
GitOrigin-RevId: bac9bae3ea39c005f0e7b9c5f7864f012d395ebb
2022-09-20 15:23:46 +00:00
Abby Sassel
89f9a5fdf2 server/tests: add permissionRows field and Permission constructor
Factoring out some minor cleanup from a PR which [tests aggregate filters and permissions](https://github.com/hasura/graphql-engine-mono/pull/5936). This PR adds a `permissionRows` field to the `Permission`s type, needed to test row permissions (https://github.com/hasura/graphql-engine-mono/pull/5936) and some default constructors.

Relates to https://github.com/hasura/graphql-engine-mono/issues/5888

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5949
GitOrigin-RevId: 89679a49496364473976cc73afa4d064a02bbf21
2022-09-20 09:17:32 +00:00
Daniel Chambers
04ae6abf78 Exists support in filter expressions for Data Connector queries [GDW-133]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5904
GitOrigin-RevId: 6bad4c29a7d14d3881f9c57fe983d14cc41bdc4b
2022-09-20 04:01:33 +00:00
Samir Talwar
6c03eef990 server: Add test cases for inconsistencies upon reloading or replacing the metadata.
I am working on https://github.com/hasura/graphql-engine/issues/8807, and wanted to write a Haskell integration test case to reproduce it.

We have Python integration tests somewhat covering this behavior in *test_inconsistent_meta.py*, but no Haskell tests, so I thought I'd shore up the coverage here by adding a few test cases for working behavior.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5897
GitOrigin-RevId: 21500e530e413feaede5cbd8b4a94b07d25a6260
2022-09-19 18:49:31 +00:00
Gil Mizrahi
a3036be77b tests-hspec readme: update m1 workaround fix
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5931
GitOrigin-RevId: 4aeefb430e8aa7c3a257b0cce440842c3ed156df
2022-09-19 09:54:38 +00:00
Abby Sassel
71597778c9 server/postgres: fix non-latin text elements in array literals (copy). close hasura/graphql-engine#8961
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5916
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 9063f7ff39f684c4ab43f093706b872021b67b13
2022-09-18 16:08:15 +00:00
Philip Lykke Carlsen
26cdc03aa4 fix(#8904): Make BigQuery Computed Fields arguments optional
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5909
GitOrigin-RevId: 0d7c7de273c27bbd2338f42253754be0a06ea66e
2022-09-17 22:41:19 +00:00
Abby Sassel
3056678e04 server/postgres: Implement execution of aggregation predicates
PR for the translation / execution step of [aggregation predicate filters](https://github.com/hasura/graphql-engine-mono/issues/5174).

[`translateAVAggregationPredicates`](translateAVAggregationPredicates) is the main change of note, everything else is a supporting or helper function. Please note this doesn't yet include [tests relating to permissions](https://hasurahq.slack.com/archives/C01RZPEPF0W/p1662560092197769); I decided to raise a PR without them for slightly faster feedback. I may include them in this PR or a separately if it's not trivial.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5724
GitOrigin-RevId: fcac258b64066e2bd45108372165a16fd957f5ab
2022-09-16 15:01:03 +00:00
Lyndon Maydwell
ba0a685211 CI Support for Data Connector Agent Tests - GDW-336
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5808
GitOrigin-RevId: 817575185cdbd21985c647f22d5b643ce0852ef6
2022-09-15 09:47:24 +00:00
Solomon
4a0446852c Adds configSchema to get_source_kind_capabilities
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5860
GitOrigin-RevId: 9bc13af5104251c509194d28ece81066643ab2a2
2022-09-14 07:07:04 +00:00
paritosh-08
db710d38b7 server, pro: event trigger auto cleanup (increment 2)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5746
Co-authored-by: pranshi06 <85474619+pranshi06@users.noreply.github.com>
Co-authored-by: Puru Gupta <32328846+purugupta99@users.noreply.github.com>
Co-authored-by: Karthikeyan Chinnakonda <15602904+codingkarthik@users.noreply.github.com>
GitOrigin-RevId: f4e5e06389ca57bdb5f7771f459c07418787111d
2022-09-13 08:34:52 +00:00
Naveen Naidu
005dbf43cb server: event triggers should be dropped when a previously present source is dropped in replace_metadata
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5739
Co-authored-by: paritosh-08 <85472423+paritosh-08@users.noreply.github.com>
GitOrigin-RevId: 772de8bb6a55a0002885e08a778c16f22ea0b113
2022-09-13 04:18:21 +00:00
Solomon
fb3ba23a44 get_source_tables API call, don't fold table names.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5837
GitOrigin-RevId: 9f785793a279c4016d8ed88374d2442019489252
2022-09-13 02:06:24 +00:00
Daniel Harvey
00b1acaf38 tests: JSON and JSONB hspec tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5721
GitOrigin-RevId: dde515a364566aa8d517923281ea670a8decbdd9
2022-09-12 14:17:19 +00:00
Daniel Harvey
50750e0aa9 tests: log in a better place so we don't miss things
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5763
GitOrigin-RevId: 5e3c0be1555596b90c88bbe4c29f88d14552efea
2022-09-07 15:41:28 +00:00
Daniel Harvey
8c8dc7a52f tests: add CockroachDB hspec tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5789
Co-authored-by: Tom Harding <6302310+i-am-tom@users.noreply.github.com>
GitOrigin-RevId: 870005475c289634cc2740bc375794267b45da1f
2022-09-07 15:12:03 +00:00
Daniel Harvey
bf91655c30 tests: allow skipping test suites using a Fixture option
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5773
GitOrigin-RevId: 4ff0f18e96313ce5c0ceb5a284e382a70ed0b9b4
2022-09-07 09:17:22 +00:00
Lyndon Maydwell
cd6fe41b99 SQLite Data Connectors HSpec Tests - GDW-183
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5731
GitOrigin-RevId: 0af22a85bd6b1cb8888562e05cde640047e56b41
2022-09-07 03:43:32 +00:00
David Overton
f4419236ed Gdc capabilities scalar types - GDW-87
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5597
GitOrigin-RevId: 4f561bf476266955d7b1d3dbca4d406a97bf8b34
2022-09-06 04:26:03 +00:00
Tom Harding
136349a70a Tidy up simple object query tests, match fixtures to docs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5752
GitOrigin-RevId: 2e308504a188745ad5714d60d0fe449a65d6f950
2022-09-05 11:09:38 +00:00
Tom Harding
2ac1680817 Update primary key hspec tests to match the docs, add failure cases
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5753
GitOrigin-RevId: ac3070b6a5dbfecdabead209a5f4ee7daa948066
2022-09-05 10:37:09 +00:00
Solomon
36ddb267df Data Connectors: List Capabilties Metadata Endpoint
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5723
GitOrigin-RevId: 2dcd3c102fd41073449ae719ab6fa39bfd76bba5
2022-09-02 17:51:19 +00:00
Daniel Chambers
9ef243f0b2 Fixed Constraint's foreign table not being typed with TableName in Data Connector API
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5687
GitOrigin-RevId: 5f616e65c493e640770d0b53f265bd2b62ad9369
2022-09-01 00:52:35 +00:00
Philip Lykke Carlsen
b0d2262b20 Let the same SQL function serve as both a computed field and as a root field (fixes hasura/graphql-engine#8643)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5676
GitOrigin-RevId: f891e4172504897bb125bb1e524dc75b11e319c1
2022-08-30 15:00:45 +00:00
Daniel Harvey
2e2b894ed3 tests: log everything posted to HGE in hspec tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5636
GitOrigin-RevId: d6bc47857e3ad3c6a995284ba6756a643cfb9c4c
2022-08-30 08:54:04 +00:00
Solomon
ba86adf224 Adds GetSourceSchema API - GDW-128
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5655
GitOrigin-RevId: 1589930f15450b7b5b4762c17430c6d401f1751c
2022-08-29 23:52:47 +00:00
Lyndon Maydwell
88c5b14c3d Adding EXPLAIN endpoint capability and implementation for SQLite data connector agent GDW-181
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5603
GitOrigin-RevId: b9255d265ceb88d96643c95f409387fb93df6676
2022-08-29 03:40:16 +00:00
Solomon
18f9bf481c Fix GDC Metadata API Tests and Typescript Code Generation
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5624
GitOrigin-RevId: a595aeb94971a5ee4968b403af4670e06684b708
2022-08-29 00:21:26 +00:00
Gil Mizrahi
a35bd278ad server/postgres: fix string literals in arrays
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5634
GitOrigin-RevId: 67970b0c0f10c187c1a4b97d457717e14fdbd2c8
2022-08-26 09:42:26 +00:00
Solomon
73276b008a Parse dont validate dangerous boolean collapse
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5642
GitOrigin-RevId: aecce571dcbb0672b708a746dfae9aa549547ecf
2022-08-26 04:38:41 +00:00
Gil Mizrahi
5aab7e5ce9 add cockroach to docker compose and tests-hspec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5558
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: b7f242939e718d5bb4f22b11c093ae77d21cdcce
2022-08-25 17:18:40 +00:00
Solomon
37601d7303 Adds support for GDC relationships in metadata API and adds support for foreign key constraints to GDC
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5561
GitOrigin-RevId: 221a5dae514c3ac60cc60ba1ec9451a04984d491
2022-08-23 21:47:26 +00:00
Naveen Naidu
dae6cfa9a6 server: enforce event triggers name in a source to be unique
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5394
GitOrigin-RevId: 78015262365985329c18ed25897ca6d6f4422ecb
2022-08-23 08:51:11 +00:00
Tom Harding
d89ad0cd35 Add explanation of new test structure to the tests-hspec README (close #4757)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5574
GitOrigin-RevId: 439da1fbf1d3b3a519f28393408eebbcf5817f63
2022-08-22 10:51:44 +00:00
Daniel Harvey
5a126a693e server: MSSQL varchars compared to nvarchars
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5536
GitOrigin-RevId: ff2e5c9a71dbb02e729b7715d5df752675fc4656
2022-08-22 08:34:41 +00:00
Daniel Chambers
1280b7f0f6 server: Remove redundant filter expressions from Data Connector queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5479
GitOrigin-RevId: 65ef71bbd7dfc69ec3e678bcf0eb5ccf9bc025f5
2022-08-22 04:23:49 +00:00
Tom Harding
4a9da49f8d Move ArrayParamPermissionSpec under Postgres
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5492
GitOrigin-RevId: f9f002934acdb9cb9eb82772969663983de05a23
2022-08-19 16:13:07 +00:00
Daniel Harvey
6040cb065e tests: Use async instead of forkIO in test setup
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5544
GitOrigin-RevId: e932e1f76c6e20121c64a429a6eb613d550c6eca
2022-08-19 14:57:02 +00:00
Tom Harding
283d51668f Move BackendOnlyPermissionsSpec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5539
GitOrigin-RevId: 96851c840ea945af250c8eb876ea183b8384f5d9
2022-08-19 12:59:03 +00:00
Daniel Chambers
ef0ca7dea2 server: Data Connectors support for ordering by related table column and aggregates [GDW-126]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5478
GitOrigin-RevId: 269d33d48f7d41efc7ab4ac6efd9442c6741d08c
2022-08-19 07:01:52 +00:00
Tom Harding
dea80bfac7 Refactor the InsertDefaultsSpec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5534
GitOrigin-RevId: b5434dbaf86315b77cf9c5ed9d61f80e87c7fc64
2022-08-18 18:16:26 +00:00
Abby Sassel
1fca1eeb7c server/tests: reorganise RunSQLSpec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5512
GitOrigin-RevId: 45761ec297b629de283c310624d9ccb587f30c19
2022-08-17 13:35:09 +00:00
Tom Harding
78e6c9369a Move ObjectRelationshipsLimitSpec to the regression test directory
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5493
GitOrigin-RevId: e4303cd15229c3551269dac84dcb2670f875359c
2022-08-17 09:51:07 +00:00
Lyndon Maydwell
5d751bf0ba Adding metrics capability to data-connector agents (with specs)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5444
GitOrigin-RevId: 49242e83fc1efeb5665515b44368e930818baf27
2022-08-17 01:47:36 +00:00
Solomon
418d0e2cc2 Use NonNegative types for arg/env parsing
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5305
GitOrigin-RevId: 8274ca8c4217d15939fa2a78664a2be486426bf7
2022-08-17 01:09:19 +00:00
Tom Harding
b4639fd10f Move the InsertOnConflictSpec test to regressions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5495
GitOrigin-RevId: be6986ca1073b76be21fe52ef217dc84f901fe81
2022-08-16 12:29:47 +00:00
Tom Harding
7e6c9df291 Move CustomRootFieldsSpec under Subscriptions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5494
GitOrigin-RevId: bdd0fd4e7a6b6465be59dd497c0ff06588f35445
2022-08-16 11:54:29 +00:00
Tom Harding
a54cbc17c3 Migrate InsertCheckPermissionSpec to the new structure
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5363
GitOrigin-RevId: 6de7600f7d9e6a04a10290d85bb83bb564352772
2022-08-15 18:10:44 +00:00
Daniel Harvey
f4df7f0162 tests: fix interpolateYaml quasi quoter when parsing '*'
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5491
GitOrigin-RevId: 3fbea70c9c9ebf4584cb140854e98db680a4137f
2022-08-15 17:17:44 +00:00
Brandon Martin
98ba6f8751 Merge pull request #5477 from hasura/gil/fix_ulls_first
server/postgres: Fix ulls first parsers + long identifiers + test

GitOrigin-RevId: 74e067b13ca0b4bc47147e715b87a187cd1aeb29
2022-08-15 15:42:34 +00:00