Commit Graph

3804 Commits

Author SHA1 Message Date
Brandon Simmons
b167120f96 server: add explicit export lists in OSS server and enforce with warning
We'll see if this improves compile times at all, but I think it's worth
doing as at least the most minimal form of module documentation.

This was accomplished by first compiling everything with
-ddump-minimal-imports, and then a bunch of scripting (with help from
ormolu)

**EDIT** it doesn't seem to improve CI compile times but the noise floor is high as it looks like we're not caching library dependencies anymore

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2730
GitOrigin-RevId: 667eb8de1e0f1af70420cbec90402922b8b84cb4
2021-11-04 16:09:38 +00:00
hasura-bot
a886da2f21 server: address recent graphql-ws related bugs
GITHUB_PR_NUMBER: 7730
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7730

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2685
Co-authored-by: Sameer Kolhar <6604943+kolharsam@users.noreply.github.com>
GitOrigin-RevId: 55bafd4eb1576e95803350f3ba9c7920a21de037
2021-11-04 12:40:02 +00:00
Ikechukwu Eze
1c15991605 console: use react-query for data fetching with custom hook
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2696
GitOrigin-RevId: 062b59470dae2a1cbba68ef47f2a52beec7ed4b8
2021-11-04 10:42:17 +00:00
Aravind K P
50d8448403 cli: fix actions transforms test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2754
GitOrigin-RevId: 442ce3a279f598e175ab28223db3ccf68b20b706
2021-11-03 17:44:12 +00:00
Karthikeyan Chinnakonda
0c21100892 server: relocate some of the pre metadata separation source catalog migrations
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2687
GitOrigin-RevId: 9fd1c9bdfdf8de1e0d39333368ec799ae92a9e71
2021-11-03 14:21:40 +00:00
Philip Lykke Carlsen
7fd098c0a6 Manually graft OSS PR graphql-engine#6535.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2758
GitOrigin-RevId: cf3c1a5c55e58c0c41853ebc65faf38213700c2c
2021-11-03 12:29:15 +00:00
Rishichandra Wawhal
ad90b09916 cloud-docs: add documentation for preview apps
>

### Description

Adds documentation for the cloud preview apps feature.

https://deploy-preview-2474--hasura-docs-mono.netlify.app/graphql/cloud/preview-apps.html

### 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

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

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2474
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Vaishnavi <85152989+vaishnavigvs@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: c512d26fe3ffc047240497848b62cacdac2f32f3
2021-11-03 11:00:35 +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
Solomon Bothwell
9c27f66768 docs: add actions transforms content
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2540
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: d9318aca67646c29b5d951a5d0603fc463e1467b
2021-11-02 14:36:36 +00:00
Philip Lykke Carlsen
ef4d194d79 RFC: Column Mutability
This PR contains two pull requests:

[Identity Columns](https://github.com/hasura/graphql-engine-mono/blob/rfc/identity-columns/rfcs/identity-columns.md) collects information and product decisions about identity columns. There are some decisions we need to make explicit.

[Column Mutability](https://github.com/hasura/graphql-engine-mono/blob/rfc/identity-columns/rfcs/column-mutability.md) proposes an implementation strategy for identity columns and similar that should be able to elegantly accommodate differences among backends. The idea is to model the notion of _column mutability_ rather than e.g. identity columns directly.

Please volunteer your opinions and perspectives on these topics in the PR comments.

---
Closes #2407

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2507
GitOrigin-RevId: 5eb14a53504985fd32933c182bee4cc13bb70a02
2021-11-02 13:43:28 +00:00
Ikechukwu Eze
5694d41025 console: avoid setting current datasource if imported metadata doesn't contain any source (close #7725)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2735
GitOrigin-RevId: b1daf6a57fd148bb25bf292fa5f1efe671144df9
2021-11-02 12:47:16 +00:00
Divya Bhushan
7609ae84e1 docs: Fix typo in server config reference page
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2707
GitOrigin-RevId: 1920099e67d48299fa762b36c26c6e627a0694ec
2021-11-02 11:15:15 +00:00
hasura-bot
197b66cc2b changing “ (unicode) for " (UTF-8)
GITHUB_PR_NUMBER: 7607
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7607

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2460
Co-authored-by: Thiago Damas <2286973+thiagodamas@users.noreply.github.com>
GitOrigin-RevId: 839bbdcccb865d2f5710b85478a95c38d258d48e
2021-11-01 11:05:01 +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
Phil Freeman
05c5df49b5 server/rfc: Haskell integration test suite
[Rendered](https://github.com/hasura/graphql-engine-mono/blob/phil/hspec-test-suite-rfc/rfcs/hspec-test-suite.md)

Related to (but more broadly scoped than) https://github.com/hasura/graphql-engine/issues/7137

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2423
Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com>
GitOrigin-RevId: 5845b0323653d2d8ccdce69c29855abb7f401b7a
2021-10-28 10:36:11 +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
Philip Lykke Carlsen
faaf34cf94 Added a .git-blame-ignore-revs file
I've added a file `.git-blame-ignore-revs`, containing the rev of the
codebase-wide ormolu reformatting.

Issuing the command `git config blame.ignoreRevsFile .git-blame-ignore-revs`
causes `git blame` to 'see through' the renaming as best it can.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2699
GitOrigin-RevId: 0e62905e897e94e1fa51dc36c4e31015f0adb32a
2021-10-27 18:17:16 +00:00
Abhijeet Khangarot
6e063ea771 console: fix permissions builder bug
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2694
GitOrigin-RevId: b502204fba9cfcf325203f10ca5a9409448a403a
2021-10-26 18:08:00 +00:00
Abby Sassel
7e3c9acfe2 server/mssql: delete mutations rfc
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2596
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: f6c0049114d4d009d588efe650aed1063a8b87ed
2021-10-26 13:24:04 +00:00
Robert
503c220840 server: refactor GraphQL.Transport.HTTP.runGQ for readability
I was trying to figure out how to pipe some information from query
execution to the http log recently, and once again stumbled over the
mess that is `runGQ`. Here's an attempt to break it apart a little bit.

The result should by no means be considered final, but I hope it makes it
somewhate easier to understand what's going on in this function. E.g. now it's
once again somewhat visible how execution of queries and mutations differs.
Had to stop somewhere...

The PR is intended to have no functional change. It consists of individual
commits which should be "obviously" such.

Some thoughts and possible follow-up:
- It'd be good to get rid of the ad hoc `Result` data type again eventually,
  but for the moment I think it's better than the tuples that used to be.
- I think we're quite close to reducing the duplication with WebSocket. E.g.
  executeQueryStep and executeMutationStep might be reusable.
- It's tempting to change the caching API slightly, so that the uncached
  response headers don't have to be pulled from the cache lookup result.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2669
GitOrigin-RevId: ea414d24194509ce29469d74c62fd060b750488d
2021-10-26 11:45:27 +00:00
Praveen Durairaju
c1873ff3fc update brand assets
<!-- Thank you for ss in the Title above ^ -->

## Description ✍️
<!-- Please fill this se-->
<!-- Describe the changes from a user's perspective -->
This PR updates all the brand assets to reflect latest brand guidelines.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2653
GitOrigin-RevId: dc91a1c27baf78619c84879a6399a2c175c2b252
2021-10-26 09:51:31 +00:00
hasura-bot
0e6bcfdba4 community: convert realtime poll sample app to hooks (close #7675)
GITHUB_PR_NUMBER: 7694
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7694

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2620
Co-authored-by: andykcom <532952+andykcom@users.noreply.github.com>
GitOrigin-RevId: 428d9a17468f18376957963a152afb11d176a39c
2021-10-26 08:26:05 +00:00
Robert
44977bdf9d ci: stabilize server-upgrade-downgrade test on buildkite
fixes https://github.com/hasura/graphql-engine-mono/issues/2635

The test is running postgres via docker compose, but wasn't waiting
for postgres to be ready, which is likely what caused intermittent
failures when trying to clean metadata.

Also make indentation consistent.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2670
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: 5a4c03c3c05322695ee9ff9a49efc834dea37074
2021-10-25 12:28:50 +00:00
hasura-bot
ec4ef91273 docs: add examples for regex operators (closes #6919)
GITHUB_PR_NUMBER: 7691
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7691

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2618
Co-authored-by: Rafael Baldasso Audibert <32079912+rafaeelaudibert@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: eeec4eba087c10d7008092a1f70acc82e73c4fcc
2021-10-25 10:35:16 +00:00
Sibi Prabakaran
9f35e660c0 server/mysql: Implement MySQL explain API
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2367
Co-authored-by: Chris Done <11019+chrisdone@users.noreply.github.com>
Co-authored-by: Aniket Deshpande <922486+aniketd@users.noreply.github.com>
Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com>
GitOrigin-RevId: 701c84a1ca5e4ab73a229a804381a7f5281090f1
2021-10-23 11:43:25 +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
Vijay Prasanna
21b36b6dcb console: allow adding read replicas to existing datasources
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2638
GitOrigin-RevId: 9f490da83257820b111d7dab786d2c90d1a114cd
2021-10-22 10:00:50 +00:00
Sameer Kolhar
631f39cadf server: fix flaky test_check_events_statuses test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2467
Co-authored-by: paritosh-08 <85472423+paritosh-08@users.noreply.github.com>
GitOrigin-RevId: a6388397dae11e38962321915c06496cc57ffd64
2021-10-22 05:55:59 +00:00
Chris Done
459a7adbfb Add Types/FromIr changes for MySQL to work with the DataLoader
While it looks like a lot of work in FromIr.hs, you can rather review the type changes in `Hasura.Backends.MySQL.Types.Internal` and the changes to FromIr are only to reflect that. Essentially we're simplifying the FromIr code to not think about SQL-based joins: instead, FromIr produces fields necessary for the dataloader Plan/Execute to do their job properly.

I've done my best to ensure that all the hunks in the diff in this PR are minimal for slightly easier perusing.

I think future PRs will be more intentionally well structured, rather than created retroactively.

**Preceding PR:** #2549

**Next PR**: #2367

The tests have been run like this on my machine. I don't know more beyond that.

```
docker run -i -e "PYTEST_ADDOPTS=--color=yes" -e "TERM=xterm-256color" --net=host -v`pwd`:`pwd` -w`pwd`/server/tests-py chrisdone/hasura-pytest:b0f26f615 pytest  --hge-urls="http://localhost:8080"  --pg-urls="postgres://chinook:chinook@localhost:5432/chinook"  --backend mysql -k MySQL
```

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2608
Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com>
GitOrigin-RevId: a6483335c3036963360dde7d7d7eaf10859351cb
2021-10-21 23:51:17 +00:00
Solomon Bothwell
03aff6e82e Wrap string interpolations with double quotes on the backend
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2601
GitOrigin-RevId: 53c27dddd30968dd28325e3336721aa1a238815f
2021-10-21 13:32:49 +00:00
Abby Sassel
6246bd297f server/docs: link to STYLE from CONTRIBUTING
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2655
GitOrigin-RevId: b5a60ad43ab0e2f8e026b91c4fe0aa48883c7d41
2021-10-21 11:34:50 +00:00
Martin Mark
0430ab1964 console: Apply Tailwind styles to Connect Datasource table
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2372
Co-authored-by: Nicolas Beaussart <7281023+beaussan@users.noreply.github.com>
GitOrigin-RevId: 289ddc445aee7f3acb3a1b40d154f807af0f2021
2021-10-21 09:26:43 +00:00
awjchen
c49f913539 tests: Implement tests for DB-to-DB joins
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2645
GitOrigin-RevId: ab85f4911c5b3559ea7878e6682459fd8fc6a356
2021-10-21 03:40:17 +00:00
awjchen
67b4e1cc5b server/tests: initial work on a test suite for DB-to-DB joins
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2403
Co-authored-by: Kali Vara Purushotham Santhati <72007599+purush7@users.noreply.github.com>
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
Co-authored-by: Naveen Naidu <30195193+Naveenaidu@users.noreply.github.com>
Co-authored-by: Divi <32202683+imperfect-fourth@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: deaad7afa9df5d3e542cf699e57957de9254f347
2021-10-20 20:02:34 +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
Karthikeyan Chinnakonda
8acd35c2e7 rfc: log DB stats when the catalog is migrated
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2637
GitOrigin-RevId: c605d93172ae3cbde669bcac76583fe3903dec34
2021-10-20 12:33:23 +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
Aishwarya Rao
e2e740aa68 pro-console: Make caching discoverable on console
### Description
Since caching is now enabled for free tier, the following changes are to be done to ensure caching is more discoverable:

Spec: https://docs.google.com/document/d/1Ic2I7wQYj_A8qJhRffboQPdDsozd463fy-wuvb1bERw/edit

### Affected components
- [x] Console

### Related Issues
#2340

### Solution and Design
1. Added a new Cache button to the GraphiQL toolbar
2. Added a GraphiQL footer to display response time and response size for queries
3. Removed 'Copy' and 'Voyager' buttons to make space for 'Cache' button

### Steps to test and verify
1. Click on the 'Cache' button on the GraphiQL toolbar to add @cached directive to your query which enables caching for query response.
2. The response time and response size details will be displayed in the footer below the query response
3. The Cache keyword with a success icon is displayed in the footer when response caching is enabled

### Screenshots
1. Queries without response caching
<img width="1440" alt="Screenshot 2021-09-15 at 11 09 23 AM" src="https://user-images.githubusercontent.com/59638722/133379080-9e4fa2ac-2a60-4030-9152-739564fd2419.png">

2. Response caching enabled
<img width="1440" alt="Screenshot 2021-09-15 at 11 09 50 AM" src="https://user-images.githubusercontent.com/59638722/133379089-3ddb321f-ae82-4d57-ab50-0284f151819c.png">

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2353
Co-authored-by: Rishichandra Wawhal <27274869+wawhal@users.noreply.github.com>
GitOrigin-RevId: abc7566085c8ed7e362a0abc2b3906c2c8974cee
2021-10-19 09:07:37 +00:00
Chris Done
7553ca170b Add backend modules for MySQL
This is the next part in the series of MySQL PRs.

**Purpose**: Adds the modules related to the generic backend abstraction. This is the penultimate PR.

The final PR will be the more substantial change made to FromIr (and small tweaks to Execute) that will connect all the things together including Python tests.

**Preceding PR:** #2529

**Next PR**: #2608

After #2529 is merged, this can be repointed to `main`. For now it's aimed at #2529, because then the diff display is simpler.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2549
Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com>
GitOrigin-RevId: 9d48ac38f4ac7c32c79ba521d3de40805c2a13bc
2021-10-18 16:05:26 +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
Chris Done
4bbdb7a67d Add Plan part for the MySQL data loader
This is the next part in the series of MySQL PRs.

**Purpose**: Adds the Plan module for the data loader.

**Preceding PR:** #2511

**Next PR:** #2549

After #2511 is merged, this can be repointed to `main`. For now it's aimed at #2511, because then the diff display is simpler.

The `undefined` stubs in this PR have code already written, so they won't introduce a maintenance problem. They're only omitted for digestibility of the PR.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2529
Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com>
GitOrigin-RevId: 691b35be247531d5e1ac855598e89f6dc1eca0b6
2021-10-14 17:07:56 +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
Vijay Prasanna
69ff739a8d console: fix issue with detecting SQL functions in default value input
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2571
GitOrigin-RevId: c05fe4b3b6d938e9d873aab82691b89efe6c7f5b
2021-10-14 13:41:56 +00:00