Commit Graph

666 Commits

Author SHA1 Message Date
Karthikeyan Chinnakonda
5d1733519c server: provide option to recreate event triggers of specific or all sources in reload_metadata
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2723
GitOrigin-RevId: 5f18021f4892632c1823543595a26ec7f3d8bc32
2021-11-10 14:35:21 +00:00
Kali Vara Purushotham Santhati
7d26e86fa1 cli: fix cli-console failing to add migrations if there are tabs in SQL body
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2822
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 1036a177e81a24ac4d047b56aead42d297682c14
2021-11-10 12:36:35 +00:00
Aravind K P
97134b4d44 cli: defer validating plugins index and actions codegen repo
closes https://github.com/hasura/graphql-engine/issues/7695

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2647
GitOrigin-RevId: 675f8daa3a329f4159103178faf225e642acdb13
2021-11-10 09:22:06 +00:00
Anon Ray
0b1ecbf0a9 server: creating gen_hasura_uuid function should be idempotent
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2625
GitOrigin-RevId: aff53bbfcf284d352848e06843ec4086d6e8ea6e
2021-11-10 07:59:31 +00:00
Gavin Ray
1d228db305 contrib: Metadata V3 types + JSON Schema
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2726
Co-authored-by: BenoitRanque <25712958+BenoitRanque@users.noreply.github.com>
GitOrigin-RevId: 0a7a0452ad6dc4790fb2a745b905d4ad30e35836
2021-11-10 05:37:11 +00:00
Rakesh Emmadi
95be515a60 server/mssql: fix table_by_pk query returning empty array
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2810
GitOrigin-RevId: ed8e694d491d7bd28da0b39da2b1f1150d2e3735
2021-11-10 05:32:41 +00:00
David Overton
ec60386f9c Allow "extensions" field in remote schema response
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2818
GitOrigin-RevId: 505e8bae6d3e11199c229bd2b86af09161eb8b66
2021-11-10 02:34:56 +00:00
Matt Hardman
55c7be6b61 console: add comments to tracked functions
Closes https://github.com/hasura/graphql-engine/issues/7628

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2745
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
Co-authored-by: Alberto Francesco Motta <36401353+afmotta@users.noreply.github.com>
GitOrigin-RevId: 8a9c89a4175c5d0a48dada30a12cfdc0f4bf4250
2021-11-09 18:18:07 +00:00
Karthikeyan Chinnakonda
adb20d1d7c server: log DB locking queries during source catalog migration
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2676
GitOrigin-RevId: f01574a30d3a6bf95467ce69bb8b5e69ce4cc057
2021-11-09 14:22:44 +00:00
Puru Gupta
504f13725f server: forward auth webhook set-cookies header on response
>

High-Level TODO:

* [x] Code Changes
* [x] Tests
* [x] Check that pro/multitenant build ok
* [x] Documentation Changes
* [x] Updating this PR with full details
* [ ] Reviews
* [ ] Ensure code has all FIXMEs and TODOs addressed
* [x] Ensure no files are checked in mistakenly
* [x] Consider impact on console, cli, etc.

### Description
>
This PR adds support for adding set-cookie header on the response from the auth webhook. If the set-cookie header is sent by the webhook, it will be forwarded in the graphQL engine response.

Fixes a bug in test-server.sh: testing of get-webhook tests was done by POST method and vice versa. To fix, the parameters were swapped.

### Changelog

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

### Affected components

- [x] Server
- [ ] Console
- [ ] CLI
- [x] Docs
- [ ] Community Content
- [ ] Build System
- [x] Tests
- [ ] Other (list it)

### Related Issues
->
Closes [#2269](https://github.com/hasura/graphql-engine/issues/2269)

### Solution and Design
>

### Steps to test and verify
>
Please refer to the docs to see how to send the set-cookie header from webhook.

### Limitations, known bugs & workarounds
>
- Support for only set-cookie header forwarding is added
- the value forwarded in the set-cookie header cannot be validated completely, the [Cookie](https://hackage.haskell.org/package/cookie) package has been used to parse the header value and any unnecessary information is stripped off before forwarding the header. The standard given in [RFC6265](https://datatracker.ietf.org/doc/html/rfc6265) has been followed for the Set-Cookie format.

### Server checklist

#### Catalog upgrade

Does this PR change Hasura Catalog version?
- [x] No
- [ ] Yes
  - [ ] Updated docs with SQL for downgrading the catalog

#### Metadata

Does this PR add a new Metadata feature?
- [x] No

#### GraphQL
- [x] No new GraphQL schema is generated
- [ ] New GraphQL schema is being generated:
   - [ ] New types and typenames are correlated

#### Breaking changes

- [x] No Breaking changes

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2538
Co-authored-by: Robert <132113+robx@users.noreply.github.com>
GitOrigin-RevId: d9047e997dd221b7ce4fef51911c3694037e7c3f
2021-11-09 12:01:31 +00:00
Tirumarai Selvan
1b43f0caaa tag release v2.1.0-beta.2
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2762
GitOrigin-RevId: 092e3fee604f9620198128a8c8aced434a20644e
2021-11-08 09:26:08 +00:00
Abhijeet Khangarot
e6c62e6793 console: request transformations for actions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2164
Co-authored-by: Sooraj <8408875+soorajshankar@users.noreply.github.com>
GitOrigin-RevId: c34fb51f6f7836e7ccbcbfba26d357b86a6f1253
2021-11-03 08:59:34 +00:00
Aravind K P
bea2855b88 cli: support request_transforms in actions metadata
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2738
GitOrigin-RevId: b125043dbb9321aa8319a6dcd6e1cd6a21f4dfe1
2021-11-03 06:38:48 +00:00
Karthikeyan Chinnakonda
04527bca4f server:don't recreate event triggers unnecessarily when the metadata is reloaded
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2740
GitOrigin-RevId: 4888e2f3a69a5eb72440ca50da0b8cd5e3b2b29e
2021-11-03 01:20:39 +00:00
Ikechukwu Eze
f15b5958c5 console: fix bug with displaying 1-to-1 relationship with the same column mapping
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2639
GitOrigin-RevId: 845889c1f20379e889f2344d93e74e5060c443ef
2021-10-31 10:16:44 +00:00
David Overton
aac64f2c81 Source typename customization (close graphql-engine#6974)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/1616
GitOrigin-RevId: f7eefd2367929209aa77895ea585e96a99a78d47
2021-10-29 14:43:14 +00:00
Solomon Bothwell
ce052f0b1b Move Request Transform into the Action Definition
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2717
GitOrigin-RevId: 7c17fa41e5df2cfbc49e0ce2a1f78b3627de7051
2021-10-29 04:13:29 +00:00
Swann Moreau
33d242779f server: call auth webhook even if the request fails to parse
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2604
Co-authored-by: Anon Ray <616387+ecthiender@users.noreply.github.com>
GitOrigin-RevId: fbecc77a519212e00c766c82e6efd5338661de49
2021-10-28 18:43:47 +00:00
Solomon Bothwell
256b59f030 Updates kriti pin to 0.2.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2697
GitOrigin-RevId: 89705a3cc5a67c28cbf8d120df190fc4e42c24ff
2021-10-28 00:26:30 +00:00
Rakesh Emmadi
8e88e73a52 server/mssql: add cascade to mssql_run_sql
<!-- Thank you for ss in the Title above ^ -->

## Description
<!-- Please fill thier. -->
<!-- Describe the changes from a user's perspective -->
We don't have dependency reporting mechanism for `mssql_run_sql` API i.e when a database object (table, column etc.) is dropped through the API we should raise an exception if any dependencies (relationships, permissions etc.) with the database object exists in the metadata.

This PR addresses the above mentioned problem by
-> Integrating transaction to the API to rollback the SQL query execution if dependencies exists and exception is thrown
-> Accepting `cascade` optional field in the API payload to drop the dependencies, if any
-> Accepting `check_metadata_consistency` optional field to bypass (if value set to `false`) the dependency check

### Related Issues
<!-- Please make surt title -->
<!-- Add the issue number below (e.g. #234) -->
Close #1853

### Solution and Design
<!-- How is this iss -->
<!-- It's better if we elaborate -->
The design/solution follows the `run_sql` API implementation for Postgres backend.

### Steps to test and verify
<!-- If this is a fehis is a bug-fix, how do we verify the fix? -->
- Create author - article tables and track them
- Defined object and array relationships
- Try to drop the article table without cascade or cascade set to `false`
- The server should raise the relationship dependency exists exception

## Changelog

-  `CHANGELOG.md` is updated with user-facing content relevant to this PR.
  If no changelog is required, then add the `no-changelog-required` label.

## Affected components
<!-- Remove non-affected components from the list -->

-  Server
-  Console
-  CLI
-  Docs
-  Community Content
-  Build System
-  Tests
-  Other (list it)

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2636
GitOrigin-RevId: 0ab152295394056c4ca6f02923142a1658ad25dc
2021-10-22 14:50:13 +00:00
hasura-bot
557e71ecc1 Upgrade the graphql parser
GITHUB_PR_NUMBER: 7673
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7673

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2558
Co-authored-by: José Lorenzo Rodríguez <37621+lorenzo@users.noreply.github.com>
GitOrigin-RevId: f164d2b9694ea4e8a8d5f113021dc9568bb14661
2021-10-22 11:54:19 +00:00
Brandon Simmons
a10ec5c8d8 server: tune ghc unfolding/specialization flags for performance (closes #2610)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2629
GitOrigin-RevId: acb22a595cae672bdf5a0303094fb28fc5afcfb3
2021-10-20 16:14:54 +00:00
Ikechukwu Eze
9015b354ac console: allow dropping indices on all schemas
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2560
GitOrigin-RevId: f79fbbecbc4b7d9d9a64f7c8f2f9e36487b77158
2021-10-20 14:27:09 +00:00
Tirumarai Selvan
bcb386e7fd tag release v2.0.10 (#2646)
Co-authored-by: Vishnu Bharathi <vishnubharathi04@gmail.com>
GitOrigin-RevId: d6a8802cf4db8f852bdabe92ffa81854fe594186
2021-10-20 09:55:17 +00:00
Philip Lykke Carlsen
c4536e801c Correctly translate permissions on functions to SQL, and simplify Bool Exp IR
Prior to this change, the SQL expression that resulted from translating permissions on functions would refer to the table of the function's return type, rather than the set of rows selected from the function being called.

Now the SQL that results from translating permissions correctly refer to the selected rows.

This PR also contains the suggested additions of https://github.com/hasura/graphql-engine-mono/pull/2563#discussion_r726116863, which simplifies the Boolean Expression IR, but in turn makes the Schema Dependency Discovery algorithm work a bit harder.

We are changing the definition of `data OpExpG`, but the format accepted by its JSON parser remains unchanged. While there does exist a generically derived `instance ToJSON OpExpG` this is only used in the (unpublished) `/v1/metadata/dump_internal_state` API.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2609
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: bb9a0b4addbc239499dd2268909220196984df72
2021-10-18 09:17:42 +00:00
Vijay Prasanna
6f21b48e87 console/mssql: enable custom graphQL fields to modify tab
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2518
GitOrigin-RevId: 31f4f366e2cb8ebc7d65f73fd2d7ee6539c30886
2021-10-14 14:57:24 +00:00
David Overton
63291f6de8 fix OpenAPI for mutiple methods on same REST endpoint path
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2603
GitOrigin-RevId: 32b3133f0bb1a9bf50e4db492bab1eabf5a9430c
2021-10-14 10:32:18 +00:00
Kali Vara Purushotham Santhati
1e5a48286f cli: split remote schema permissions metadata into seperate files
closes https://github.com/hasura/graphql-engine/issues/7033

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/1877
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 3764db9102d41f67a43f76aa79d28eb5485579ca
2021-10-14 06:52:57 +00:00
Karthikeyan Chinnakonda
eb90c236ea server: recreate event triggers on startup only when the source catalog is migrated
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2572
GitOrigin-RevId: a01b3c5003dd921907e1ea0c2dc87464359de167
2021-10-13 13:01:38 +00:00
Lyndon Maydwell
788e5cb0c2 Include transformed request in errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2543
Co-authored-by: Solomon Bothwell <24038+ssbothwell@users.noreply.github.com>
GitOrigin-RevId: 1432a215cfc2c3e8345941b8072925f115f9259f
2021-10-13 00:29:49 +00:00
Martin Mark
efc86d8524 Tailwind -> Add and Modify Table Updates
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2289
Co-authored-by: Nicolas Beaussart <7281023+beaussan@users.noreply.github.com>
Co-authored-by: Martin Mark <1396255+m-rgba@users.noreply.github.com>
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: 0cb7c1ae082e05dd647edd5bd35d3632764d36ac
2021-10-11 13:21:24 +00:00
pranshi06
be1395de31 [server] Allow Nullable action response
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2379
GitOrigin-RevId: eae2b0b401737ceb4e4885ba47c342e26f2026a1
2021-10-11 06:56:01 +00:00
hasura-bot
744cf0233e cli: support absolute paths in --envfile
GITHUB_PR_NUMBER: 5768
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/5768
closes https://github.com/hasura/graphql-engine/issues/5689

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2545
Co-authored-by: cybai <6782666+CYBAI@users.noreply.github.com>
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 38eacaaa5541a7162b584f1df1376266853fe4bf
2021-10-08 14:44:48 +00:00
Kali Vara Purushotham Santhati
bcb0b99f8b cli: make --database-name optional in migrate subcommands when using a single database
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2428
GitOrigin-RevId: 2319408773b1c73bca6297c7b22dc3db82775953
2021-10-08 13:30:12 +00:00
Kali Vara Purushotham Santhati
f47095ff55 cli: init --endpoint intializes the project with metadata and migrations from HGE
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2409
Co-authored-by: Ajay Tripathi <24985760+atb00ker@users.noreply.github.com>
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 06bb3462ffe1604b80a4afde241568790aaa6704
2021-10-07 14:24:52 +00:00
Gil Mizrahi
42cd2e69c0 Add support for customising function root field names
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2468
Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com>
GitOrigin-RevId: 5ff85bb02e4e651376a40914b7ae0aabc8524a05
2021-10-07 13:03:22 +00:00
Ikechukwu Eze
826020d796 console: fix v2 metadata imports
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2510
GitOrigin-RevId: b2d44acd083637ac0c672827eb43b7698b3f2b77
2021-10-07 11:25:11 +00:00
Puru Gupta
8b60122b9e [server] add openapi support
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/1935
Co-authored-by: paritosh-08 <85472423+paritosh-08@users.noreply.github.com>
Co-authored-by: pranshi06 <85474619+pranshi06@users.noreply.github.com>
Co-authored-by: Lyndon Maydwell <92299+sordina@users.noreply.github.com>
GitOrigin-RevId: 3e43b84d4e9e181b405855704112b49467dafdf9
2021-10-06 07:16:13 +00:00
Karthikeyan Chinnakonda
64e2201179 server: enable inherited roles by default
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2325
Co-authored-by: Nicolas Beaussart <7281023+beaussan@users.noreply.github.com>
GitOrigin-RevId: 8ad6fe25a3788892128c1d56b8fa0e8feed2caca
2021-10-05 12:29:32 +00:00
Ikechukwu Eze
8ca962ab91 console: add time limits setting to security settings
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2420
GitOrigin-RevId: 9c2752c4939a8d22474277f6894bf50f02486899
2021-10-05 10:49:30 +00:00
Rakesh Emmadi
09ae6af337 server/mssql: insert SQL generation and execution
>

### Description
>
Insert mutations for MSSQL backend. This PR implements execution logic.

### Changelog

- [x] `CHANGELOG.md` is updated with user-facing content relevant to this PR. If no changelog is required, then add the `no-changelog-required` label.

### Affected components

- [x] Server
- [x] Tests

### Related Issues
->
Close https://github.com/hasura/graphql-engine-mono/issues/2114

### Steps to test and verify
>
Track a MSSQL table and perform the generated insert mutation to test.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2248
Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com>
Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com>
GitOrigin-RevId: 936f138c80d7a928180e6e7b0c4da64ecc1f7ebc
2021-10-01 12:53:15 +00:00
Tirumarai Selvan
b0f723b201 tag release v2.1.0-beta.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2472
GitOrigin-RevId: b18f755b8db82ee6376d9af02495fe55cfd93aa8
2021-09-30 09:48:30 +00:00
Aravind K P
61e069ad8a cli: allow specifiying a "to" version on migrate squash command
closes https://github.com/hasura/graphql-engine/issues/7472

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2442
GitOrigin-RevId: d804d04e0b87fc33c25407ff3991f266b0d6a6aa
2021-09-29 17:47:25 +00:00
Ikechukwu Eze
569fb3d217 console: fix missing cross-schema computed fields in permission builder
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2453
GitOrigin-RevId: 98f5320981f58c049fae5ca5d6801351d017edf6
2021-09-29 13:55:47 +00:00
Aravind K P
186baa7915 cli: add support for metadata subcommands to work with json/yaml files
closes https://github.com/hasura/graphql-engine/issues/7542

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2445
GitOrigin-RevId: c0087fa475cf4b353f4af150629684d3b9e1f82f
2021-09-29 11:13:31 +00:00
Lyndon Maydwell
22bc0e09df Ignore unexpected fields in action responses
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2459
GitOrigin-RevId: 9269fa6e71770cb31183d917595b704c5dee9713
2021-09-29 09:54:36 +00:00
Solomon Bothwell
4e05bdcaec Feature/request transform string interpolation
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2443
Co-authored-by: Tirumarai Selvan <8663570+tirumaraiselvan@users.noreply.github.com>
GitOrigin-RevId: d7d68984d0ae1403bb414572e9704c01ed27deab
2021-09-29 08:14:29 +00:00
hasura-bot
20f7c85382 cli: add deploy command (close #7349)
GITHUB_PR_NUMBER: 7426
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7426

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2173
Co-authored-by: Ajay Tripathi <24985760+atb00ker@users.noreply.github.com>
Co-authored-by: Kali Vara Purushotham Santhati <72007599+purush7@users.noreply.github.com>
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 1030d24c9e6c7d0c7062b6f0e98f8464950529d3
2021-09-29 06:15:17 +00:00
Aravind K P
5011955f73 cli: support query_tags in metadata
closes https://github.com/hasura/graphql-engine-mono/issues/2261

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2347
GitOrigin-RevId: 30d461c0b70f4a4924496d9c3f53cb73a658093a
2021-09-28 17:05:48 +00:00
Sameer Kolhar
4ca2c7554c server: support user comments for trackable functions
https://github.com/hasura/graphql-engine-mono/pull/2290

GitOrigin-RevId: 3d7cf89b7e1d545475bad44ccc233b6f11145a01
2021-09-24 09:19:40 +00:00