Commit Graph

718 Commits

Author SHA1 Message Date
Karthikeyan Chinnakonda
56e40e1d0e server: add a new metadata API to return all the cron triggers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3464
GitOrigin-RevId: 97b043ec0b4194cde83f2d78c3dc963cf0414c29
2022-01-27 06:44:37 +00:00
Daniel Chambers
bd6f7cd756 Fixed GQL aliases not being respected in the OpenAPI schema
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3484
GitOrigin-RevId: 0f49dd7f64e80dfe6940d673afa76f12f6599126
2022-01-27 05:55:55 +00:00
Daniel Chambers
c861f0b09d Fix REST endpoints with path segments not showing correctly in the OpenAPI spec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3443
GitOrigin-RevId: 92ab7ccc004fedb149f336b0585e6f002e08e2a9
2022-01-25 06:28:47 +00:00
David Overton
8eca322b94 Fix for customized remote schema input object types in query variables
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3417
GitOrigin-RevId: a4d3e59f5177f971a64a2b9e62fd1acaa8079a6b
2022-01-24 04:46:46 +00:00
hasura-bot
f530b3ac6f cli: fix regression with --address flag of hasura console command
GITHUB_PR_NUMBER: 8039
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/8039
closes https://github.com/hasura/graphql-engine/issues/8005

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3381
Co-authored-by: Shoki Hata <37888628+sho-hata@users.noreply.github.com>
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 6ca7c091ebf7c240e97b65fbfc1713cccb5a5b82
2022-01-20 06:41:05 +00:00
Solomon
4b792abdcc Feature/webhook response transforms
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3074
Co-authored-by: David Overton <7734777+dmoverton@users.noreply.github.com>
Co-authored-by: Lyndon Maydwell <92299+sordina@users.noreply.github.com>
Co-authored-by: Tirumarai Selvan <8663570+tirumaraiselvan@users.noreply.github.com>
GitOrigin-RevId: 006c5c9b71cdca1c2f47962230e6189e09557fab
2022-01-19 04:47:36 +00:00
Rakesh Emmadi
fbfdf9a04d server/mssql: restrict "count" aggregate query on multiple columns
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3354
GitOrigin-RevId: d9890782ff8e3ea40ec52c0da82e43ecf5c36d2b
2022-01-18 14:54:46 +00:00
Kirill Zaborsky
47b9321ba4 BigQuery operators: like/nlike, geography
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2924
GitOrigin-RevId: 3748411cb4419a21a58283836adb5cb39d351d19
2022-01-18 13:37:12 +00:00
Daniel Chambers
2c5cf6983b Fixed schema & table dropdowns being unsorted on 'create event trigger' page
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3385
GitOrigin-RevId: 619f1bb8b22e048b47b629a1b6b3315943f1b1fe
2022-01-18 08:50:10 +00:00
Abhijeet Khangarot
54b5088acf rename webhook transforms to REST Connectors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3334
Co-authored-by: Tirumarai Selvan <8663570+tirumaraiselvan@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 6722cc6449daa5111aa3d6afca8909c5af525bf7
2022-01-17 13:28:04 +00:00
Kirill Zaborsky
7beb15b4a3 distinct_on for BigQuery
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3191
GitOrigin-RevId: e9f1c814b2caf09946389c4bcb30a0c42277abaf
2022-01-17 10:02:17 +00:00
Rakesh Emmadi
08f1725698 server/mssql: expand transactions to GraphQL queries and mssql_run_sql API
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3286
GitOrigin-RevId: 0b37767e271dfa43d36fa7f7cc9928ba6a22964d
2022-01-14 14:09:22 +00:00
hasura-bot
d5e2d613f0 cli: stop using healthz endpoint
GITHUB_PR_NUMBER: 7994
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7994

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3268
Co-authored-by: Romain Briand <183016+romainbriand@users.noreply.github.com>
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: e034fddaea604ba98797e2d9dcab779b2cc21378
2022-01-14 04:17:41 +00:00
Kirill Zaborsky
560daa63a8 BigQuery: fix support for joins in nodes of aggregate queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3233
GitOrigin-RevId: a3a4624d5cd0c4c562e27d1e3605882e7f5a3d0d
2022-01-13 15:09:52 +00:00
Rakesh Emmadi
42a2787290 server/mssql: update odbc git reference to the commit which has error message fix
## Description

I come across a flaky test due to inconsistent error messages from the odbc lib we use for MSSQL database interactions.
```
cabal new-run -- test:graphql-engine-tests mssql
Up to date

Database.MSSQL.TransactionSpec
  runTx
    runs command in a transaction
    commits a successful transaction, returning a single field
    commits a successful transaction, returning multiple fields
    an unsuccesful transaction, expecting Int
    a successfull query expecting multiple rows
    an unsuccesful transaction; expecting single row
    displays the SQL Server error on an unsuccessful transaction FAILED [1]
    rolls back an unsuccessful transaction

Failures:

  src-test/Database/MSSQL/TransactionSpec.hs:60:15:
  1) Database.MSSQL.TransactionSpec.runTx displays the SQL Server error on an unsuccessful transaction
       expected: UnsuccessfulReturnCode "odbc_SQLExecDirectW" (-1) "[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The definition for column 'INVALID_SYNTAX' must include a data type.[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The definition for column 'INVALID_SYNTAX' must include a data type."
        but got: UnsuccessfulReturnCode "odbc_SQLExecDirectW" (-1) "[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The definition for column 'INVALID_SYNTAX' must include a data type.[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The definition for column 'INVALID_SYNTAX' must include a data type.\DEL"

  To rerun use: --match "/Database.MSSQL.TransactionSpec/runTx/displays the SQL Server error on an unsuccessful transaction/"

Randomized with seed 1101559172

Finished in 0.2140 seconds
8 examples, 1 failure
```
From above, we got a error message with `\DEL` appended. It is also driving the tests to fail in the CI on random PRs.

We brought this into notice of "fpco", the authors of the library and they got us a [quick fix](https://github.com/fpco/odbc/pull/43), which also improves the errors by removing the redundancy of the error message.

In this PR
- We update the `odbc` library git reference to fc5b592a60
- Update the error messages in tests to conform with improved error messages from `odbc`

## Related issues
Closes https://github.com/hasura/graphql-engine-mono/issues/3340

## Changelog

-  `CHANGELOG.md` is updated with user-facing content relevant to this PR.

## Affected components
-  server
-  tests

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3345
GitOrigin-RevId: a5694e8afb58b5ad71b9c9635a80dea1ec449f51
2022-01-13 11:15:01 +00:00
Divi
5723baaab4 cli: fix migrate create command behaviour when no data provided
closes https://github.com/hasura/graphql-engine/issues/7971

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3292
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 4f7e38d649c1f414132d576d0f288ca8d3cdb53d
2022-01-12 16:16:50 +00:00
Kali Vara Purushotham Santhati
695164b176 cli: misc changes
- Hasura CLI shows metadata diff in YAML for type `json` in directory mode. The expected behaviour is to show the diff in JSON
- The unified-json shows diff in YAML, not in JSON.
- Add new diff type unified-yaml which shows the diff in YAML unified format.
- Check the flag value of type in `hasura metadata diff --type`
- The help text of `seed apply`( `hasura seed apply --file seeds/1234_add_some_seed_data.sql`) should be updated to `hasura seed apply --file 1234_add_some_seed_data.sql --database-name default` and similarly in docs.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3246
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 1d16ad9ea4dd366af32498ce878ae132bd239be9
2022-01-12 13:25:22 +00:00
Rakesh Emmadi
f49bb2b180 server/mssql: rollback a transaction based on the transaction state
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3247
GitOrigin-RevId: 70307d8723a63b9314b6ff4d897dcac6e8e93fb9
2022-01-05 08:03:59 +00:00
Gil Mizrahi
a5f2161e1c server/mssql: upsert - sql generation and execution
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3207
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
GitOrigin-RevId: 92a4aa3cf802bc76858c4be4273a2f6a7d4aa395
2021-12-31 10:56:58 +00:00
Kirill Zaborsky
a2bf2fdc8f Fix aggregates for comparable types in BigQuery
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3211
GitOrigin-RevId: 1a63b0835fc5af687f6caca187968edc9efbb821
2021-12-30 10:00:47 +00:00
Kirill Zaborsky
234a5385cd Fix support for FLOAT64 in BigQuery
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3209
GitOrigin-RevId: e7e981bcd043f0daab4b70344afb684484361758
2021-12-29 17:16:44 +00:00
Kali Vara Purushotham Santhati
f0bef2b482 cli: add All option for migrate sub-commands (apply, delete and status) and seed apply command
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2509
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 03ee878072b58c6dc7f43af9d26d30a5594d9a50
2021-12-23 15:59:56 +00:00
Rakesh Emmadi
60183df1ea server/mssql: use temporary tables for insert mutation execution
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3205
GitOrigin-RevId: ff889ce43ed613c283edefa68992eab7c36db18c
2021-12-22 11:05:29 +00:00
David Overton
02aef27a75 Add request body to OpenAPI
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2632
Co-authored-by: Lyndon Maydwell <92299+sordina@users.noreply.github.com>
Co-authored-by: paritosh-08 <85472423+paritosh-08@users.noreply.github.com>
GitOrigin-RevId: 067e182effaed255ff047abeee309d65a9fb191c
2021-12-22 08:31:14 +00:00
Vishnu Bharathi
26a69b3821 tag release v2.1.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3175
GitOrigin-RevId: 702444a8adba2817540382396704bcfbad0df228
2021-12-17 12:38:06 +00:00
Antoine Leblanc
bacadc30da Fix several issues with remote relationships.
## Remaining Work

- [x] changelog entry
- [x] more tests: `<backend>_delete_remote_relationship` is definitely untested
- [x] negative tests: we probably want to assert that there are some APIs we DON'T support
- [x] update the console to use the new API, if necessary
- [x] ~~adding the corresponding documentation for the API for other backends (only `pg_` was added here)~~
  - deferred to https://github.com/hasura/graphql-engine-mono/issues/3170
- [x] ~~deciding which backends should support this API~~
  - deferred to https://github.com/hasura/graphql-engine-mono/issues/3170
- [x] ~~deciding what to do about potentially overlapping schematic representations~~
  - ~~cf. https://github.com/hasura/graphql-engine-mono/pull/3157#issuecomment-995307624~~
  - deferred to https://github.com/hasura/graphql-engine-mono/issues/3171
- [x] ~~add more descriptive versioning information to some of the types that are changing in this PR~~
  -  cf. https://github.com/hasura/graphql-engine-mono/pull/3157#discussion_r769830920
  - deferred to https://github.com/hasura/graphql-engine-mono/issues/3172

## Description

This PR fixes several important issues wrt. the remote relationship API.

- it fixes a regression introduced by [#3124](https://github.com/hasura/graphql-engine-mono/pull/3124), which prevented `<backend>_create_remote_relationship` from accepting the old argument format (break of backwards compatibility, broke the console)
- it removes the command `create_remote_relationship` added to the v1/metadata API as a work-around as part of [#3124](https://github.com/hasura/graphql-engine-mono/pull/3124)
- it reverts the subsequent fix in the console: [#3149](https://github.com/hasura/graphql-engine-mono/pull/3149)

Furthermore, this PR also addresses two other issues:
- THE DOCUMENTATION OF THE METADATA API WAS WRONG, and documented `create_remote_relationship` instead of `<backend>_create_remote_relationship`: this PR fixes this by adding `pg_` everywhere, but does not attempt to add the corresponding documentation for other backends, partly because:
- `<backend>_delete_remote_relationship` WAS BROKEN ON NON-POSTGRES BACKENDS; it always expected an argument parameterized by Postgres.

As of main, the `<backend>_(create|update|delete)_remote_relationship` commands are supported on Postgres, Citus, BigQuery, but **NOT MSSQL**. I do not know if this is intentional or not, if it even should be publicized or not, and as a result this PR doesn't change this.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3157
Co-authored-by: jkachmar <8461423+jkachmar@users.noreply.github.com>
GitOrigin-RevId: 37e2f41522a9229a11c595574c3f4984317d652a
2021-12-16 20:29:19 +00:00
paritosh-08
40678855d0 server: add support for nested object type in action
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2788
Co-authored-by: David Overton <7734777+dmoverton@users.noreply.github.com>
GitOrigin-RevId: f8ed9741e95b6864a48af7db338f3f619617483a
2021-12-15 23:52:43 +00:00
Kirill Zaborsky
279f22ed08 Fix support for multiple array relationships in BigQuery
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3003
GitOrigin-RevId: 7a9bf10be6436da2d87d5555f589e23c40c76dd6
2021-12-15 15:19:49 +00:00
Rakesh Emmadi
f00404e0f6 server/mssql: update mutation, SQL generation and execution
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3059
GitOrigin-RevId: 4ed0cbf54ac2a7103cb2b7adc97b2dfdf9994c4f
2021-12-15 13:56:34 +00:00
Vishnu Bharathi
291de84179 tag release v2.1.0
GitOrigin-RevId: 3456e09d2c096a3a89866f9e92c86605237b9693
2021-12-14 15:38:26 +00:00
Abhijeet Khangarot
5726852c54 console: add sample context section to request transforms
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3110
GitOrigin-RevId: 1c11b8d1a465802490ce12cefce1469a9d24522d
2021-12-14 09:29:18 +00:00
Vamshi Surabhi
0728a9e60e fixes remote relationships format in metadata (fixes graphql-engine-mono/issues/3108)
## Description

This PR fixes two issues:
  - in [#2903](https://github.com/hasura/graphql-engine-mono/pull/2903), we introduced a new metadata representation of remote relationships, which broke parsing a metadata blob containing an old-style db-to-rs remote relationship
  - in [#1179](https://github.com/hasura/graphql-engine-mono/pull/1179), we silently and mistakenly deprecated `create_remote_relationship` in favour of `<backend>_create_remote_relationship`

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3124
Co-authored-by: jkachmar <8461423+jkachmar@users.noreply.github.com>
Co-authored-by: Antoine Leblanc <1618949+nicuveo@users.noreply.github.com>
GitOrigin-RevId: 45481db7a8d42c7612e938707cd2d652c4c81bf8
2021-12-14 06:46:11 +00:00
Aravind K P
0c7e233125 cli: revert split remote schema permissions metadata into seperate files
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3123
GitOrigin-RevId: f327c7324edd66e1f57fafe7703c3318e1362049
2021-12-14 05:08:08 +00:00
Lyndon Maydwell
36a987811e Fix interpreting urls from environment in the TestWebhookTransform endpoint
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3127
GitOrigin-RevId: 0e5ceaa01f3f27275accd828647ae8587216c80f
2021-12-14 03:25:13 +00:00
Kali Vara Purushotham Santhati
8c41ff539a cli: enhance metadata diff command
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2581
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 327c26868102ea1c277b795b9f508847faa2ae8b
2021-12-09 17:26:53 +00:00
Vishnu Bharathi
a835d95b17 tag release v2.1.0-beta.3
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3099
GitOrigin-RevId: 7aa2926871bd44d80490768f86fab7bac02a7758
2021-12-09 11:28:19 +00:00
Vishnu Bharathi
6cfbde92e4 ci: add support for linux/arm64 docker image
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2933
GitOrigin-RevId: ceeab6164d8437703cd6e37e3dad9d63940ef966
2021-12-09 09:34:22 +00:00
Solomon
e4064c9a90 Allows for mock env vars in test-webhook-transform endpoint
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3097
Co-authored-by: Lyndon Maydwell <92299+sordina@users.noreply.github.com>
GitOrigin-RevId: f0cd00b8f972a1b96213bd098ea09d72b3aba723
2021-12-09 07:59:46 +00:00
pranshi06
dee86453ea server: fallback to unauthorised role when JWT is not found in cookie
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2882
GitOrigin-RevId: ad03fbd0572e00ffe7abea106388a4df4d12af2c
2021-12-08 18:29:29 +00:00
Solomon
0faa92337d Use transformed request body in event invocation logs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3057
GitOrigin-RevId: 7e001830f97c81289553e37c35098ccaeadbdf22
2021-12-06 22:40:31 +00:00
Lyndon Maydwell
87426fdef4 Fixing REST Enpoints list variable bug
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3034
GitOrigin-RevId: af1c182879754359b253e630f1393d97d8bcfa2a
2021-12-03 21:57:25 +00:00
Solomon
4a33d6c979 Allows for env var use in test_webhook_transform mock request url
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3009
GitOrigin-RevId: e678cef69d3d4dcb47f80cd584aa0d3c25a091b8
2021-12-03 07:13:35 +00:00
Rakesh Emmadi
7194dc691c server/mssql: fix SQL generation for aggregation queries in sql server (fixes #7773 & #7871)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3024
GitOrigin-RevId: 30c0e7d713375d0c54ff7145d00985e3ade4f1a9
2021-12-02 14:22:42 +00:00
Kali Vara Purushotham Santhati
4edc723d64 cli: codesign the cli binaries
closes https://github.com/hasura/graphql-engine/issues/7147

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2100
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 1816493b6cdf1b00b267ee8852c7b8a7c5fc3ee9
2021-12-02 10:21:30 +00:00
Antoine Leblanc
90d3192df2 Unified remote relationship metadata
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2903
Co-authored-by: Vamshi Surabhi <6562944+0x777@users.noreply.github.com>
GitOrigin-RevId: 11fd6efe8cea246471e525cfb5bad66fa53ccaf9
2021-12-01 04:54:30 +00:00
Antoine Leblanc
f7071b3c93 Changed RemoteSchemaIntrospection's internal representation from a list to a hashmap.
### Description

This PR changes the internal representation of a parsed remote schema. We were still using a list of type definitions, meaning every time we were doing a type lookup we had to iterate through a linked list! 🙀 It was very noticeable on large schemas, that need to do a lot of lookups. This PR consequently changes the internal representation to a HashMap. Building the OneGraph schema on my machine now takes **23 seconds**, compared to **367 seconds** before this patch.

Some important points:
- ~~this PR removes a check for type duplication in remote schemas; it's unclear to me whether that's something we need to add back or not~~ (no longer true)
- this PR makes it obvious that we do not distinguish between "this remote schema is missing type X" and "this remote schema expects type X to be an object, but it's a scalar"; this PR doesn't change anything about it, but adds a comment where we could surface that error (see [2991](https://github.com/hasura/graphql-engine-mono/issues/2991))

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2963
GitOrigin-RevId: f5c96ad40f4e0afcf8cef635b4d64178111f98d3
2021-11-30 14:47:50 +00:00
Varun Choudhary
bc467a283a console: Add select all columns option while selecting the columns in event triggers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2688
Co-authored-by: Abhijeet Khangarot <26903230+abhi40308@users.noreply.github.com>
GitOrigin-RevId: 0b98d2f388c7f8428f3c282e8c1662f8b046f4dd
2021-11-29 12:29:47 +00:00
Abhijeet Khangarot
0f07f944ba console: request transformations for events
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2498
Co-authored-by: Sooraj <8408875+soorajshankar@users.noreply.github.com>
GitOrigin-RevId: d1c331fb989e247ed807167eefa92b226fe4afb9
2021-11-26 08:50:44 +00:00
hasura-bot
ee8ccebaca changelog: update Relay dead link
GITHUB_PR_NUMBER: 7637
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7637

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2491
Co-authored-by: wenzdey <56051809+wenzdey@users.noreply.github.com>
GitOrigin-RevId: 7a9b42f8e04c38b0e94b529b59ea9e70aae5fa87
2021-11-25 12:46:50 +00:00
Kirill Zaborsky
a2afe4116b BigQuery remote joins
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2874
Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com>
GitOrigin-RevId: 24b0304716795a28038629775238996c28b312a3
2021-11-24 16:22:55 +00:00