Commit Graph

3485 Commits

Author SHA1 Message Date
Aishwarya Rao
1adfe29f0e docs: dedicated VPC docs
This PR includes addition of dedicated VPC docs to the existing cloud docs.

https://github.com/hasura/graphql-engine-mono/pull/1809

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Shahidh K Muhammed <4124733+shahidhk@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: fb14aa04fd214fb25d369e176c4cd18db28d7f34
2021-08-05 12:50:01 +00:00
Ikechukwu Eze
2e1f0df610 console: fix untracked foreign-key relationships suggestion across schemas
This PR fixes untracked foreign-key relationships suggestion across schemas.

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

### Related Issues
close [#7177](https://github.com/hasura/graphql-engine/issues/7177)

### Solution and Design
Previously to determine relations, we'd check the foreign keys constraint on all tables in the metadata,
but from 2.0, we filtered these tables based on schema. Therefore, relationships are only reflected if both tables are of the same schema. This PR makes sure that all tables in the metadata are considered

### Steps to test and verify
- Create two schemas and a table in each
- Create a foreign key constraint on one of the tables to the other using RawSQL
- Go the schema page of the table where the constraint was created on.
- Confirm that the console suggests to track the relationship you created in step 2 above

#### Breaking changes

- [x] No Breaking changes

https://github.com/hasura/graphql-engine-mono/pull/2000

GitOrigin-RevId: c1d5229955e731bb8019955ebd7a925d7870eb17
2021-08-05 12:32:53 +00:00
Varun Choudhary
b4e329307a console: fix splitgraph console issue
Closes: https://github.com/hasura/graphql-engine-mono/issues/1746

### Description

Main problem: https://github.com/hasura/graphql-engine-mono/issues/1746#issuecomment-880492976
Solution: I ensure that there is URL encoding while routing from the data manager

The other issue that was addressed was that there was some query that was failing on the splitgraph DB that uses explicit typecasting. I removed the same from our query.

### Affected components

- [x] Console

https://github.com/hasura/graphql-engine-mono/pull/1802

GitOrigin-RevId: 8d6ebae217b07357bf147a2c881bae9de156a450
2021-08-05 10:57:38 +00:00
Vishnu Bharathi
28c7a1d0d0 scripts: avoid premature release tagging
https://github.com/hasura/graphql-engine-mono/pull/2021

GitOrigin-RevId: fd40b14e99aba0a8624f91aac11083f52545fef1
2021-08-05 10:05:25 +00:00
Tirumarai Selvan
553aecb5e5 tag release v2.0.5
GitOrigin-RevId: 8c98e9dba9fa655b5d7503211a5d3f42f641cef5
2021-08-05 07:35:10 +00:00
awjchen
cd957fb5ea ci: hide old benchmark reports on Github
https://github.com/hasura/graphql-engine-mono/pull/1996

GitOrigin-RevId: 0d2b607de9ea180e269c8f30f4a8b9618129d98f
2021-08-05 05:55:18 +00:00
jkachmar
c322af93f8 server: Uses GraphQL type in remote variable cache key
https://github.com/hasura/graphql-engine-mono/pull/1801

GitOrigin-RevId: 98843e422b2431849b675acdb318ffae2f492f18
2021-08-04 21:24:36 +00:00
Karthikeyan Chinnakonda
2f71e2e7c9 server: fine tune cron triggers behaviour in replace metadata API call
https://github.com/hasura/graphql-engine-mono/pull/1991

GitOrigin-RevId: 7eb7d7b20d0a03eda7829d3a17a35dffe0f7bf1a
2021-08-04 14:52:20 +00:00
Varun Choudhary
121afe39fe console: remove "UIKit" components from the console codebase
https://github.com/hasura/graphql-engine-mono/pull/1834

GitOrigin-RevId: 84d601072552f37740321686905e58677b5aa31c
2021-08-04 13:37:02 +00:00
Sibi Prabakaran
c93996d06c Mysql: Simple graphql queries along with offset/limits
https://github.com/hasura/graphql-engine-mono/pull/1851

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: 4b4ba6dd86c302d873bb5f8e6dbc9412e77a8bfe
2021-08-04 11:43:19 +00:00
Rishichandra Wawhal
fed7f71aa2 console: use the data host passed by lux to contact lux data service
https://github.com/hasura/graphql-engine-mono/pull/1981

GitOrigin-RevId: d9fe7d4d04afc73a8482d61de733f5ebba031144
2021-08-04 09:37:08 +00:00
Aravind K P
2898db17af cli-migrations-v2: use env variable to start temporary hasura instance
closes https://github.com/hasura/graphql-engine/issues/7319

https://github.com/hasura/graphql-engine-mono/pull/1950

GitOrigin-RevId: a2c798b5825423f9c2d37d436a3852c2262644d2
2021-08-04 06:11:06 +00:00
Brandon Simmons
0d4a65f73a ci: don't build non-release with enable_coverage, so perf is comparable
https://github.com/hasura/graphql-engine-mono/pull/1980

GitOrigin-RevId: 76ac1ad91025715d0725d3d586e5ab620e94d77a
2021-08-03 16:13:51 +00:00
Vijay Prasanna
f81741d086 console: enable aggregate permission toggle for Big Query sources
https://github.com/hasura/graphql-engine-mono/pull/1988

GitOrigin-RevId: db0545bafa923afb66f582d287d1595013c69490
2021-08-03 14:58:36 +00:00
hasura-bot
29b2404a3f docs: clarify many-to-many foreign key section
GITHUB_PR_NUMBER: 7200
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7200

https://github.com/hasura/graphql-engine-mono/pull/1744

Co-authored-by: Preston Rodeniser <29437011+prodeniser@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: e030299eacabf6df3344773f2d0999a0c67d067c
2021-08-03 14:06:59 +00:00
David Overton
9be6d4cd97 Fix getCustomizer test case
https://github.com/hasura/graphql-engine-mono/pull/1986

GitOrigin-RevId: 2f94613a7f6afe89738aee0fc5fba0ab6b19c8da
2021-08-03 13:17:34 +00:00
Karthikeyan Chinnakonda
cb29607833 server: fix mutations bug when inherited roles is enabled
https://github.com/hasura/graphql-engine-mono/pull/1989

GitOrigin-RevId: d4e41431fdf90426651dd1289eb0f0e099de95b9
2021-08-03 11:12:01 +00:00
Karthikeyan Chinnakonda
0a3fd16c35 server: revert the relaxing of unique name constraint in allow-lists
https://github.com/hasura/graphql-engine-mono/pull/1972

GitOrigin-RevId: cb062df7a1ba1c99705f811409e2e4ad42f4b581
2021-08-03 09:23:20 +00:00
Abhijeet Khangarot
bf5fe2ffe8 console: fix remote schema permission bugs
https://github.com/hasura/graphql-engine-mono/pull/1178

GitOrigin-RevId: 0c1d7dc5737a3f05330a30438f48033c7c01f42c
2021-08-03 07:57:01 +00:00
Auke Booij
5fc3cf1446 server: make LazyTxT less lazy
The `LazyTxT` type was introduced to avoid connecting to Postgres when a given GraphQL request did not require this. However, through the new way query execution plans are represented, this has now _mostly_ been taken care of in a different way, and so no `LazyTxT` action is generated at all for GraphQL requests that do not fetch data from Postgres.

This removes the laziness of `LazyTxT` by simply making it a newtype wrapper around `Q.TxET`. This simplifies a lot of code in `Hasura.Backends.Postgres.Connection`.

https://github.com/hasura/graphql-engine-mono/pull/1959

GitOrigin-RevId: 58b4d5a05d67bc602b59e02ac338f1c3e63859c7
2021-08-02 19:14:08 +00:00
Swann Moreau
63d5b7ad53 pro, server: improve parameterised query hash handling for batched requests (fix #1767)
https://github.com/hasura/graphql-engine-mono/pull/1768

GitOrigin-RevId: 11615408ee2fb097e68ee4a641e5dc46c1d28795
2021-08-02 16:05:17 +00:00
David Overton
3e1e0773fe Test customization with update_remote_schema
https://github.com/hasura/graphql-engine-mono/pull/1971

GitOrigin-RevId: 617f15193e1149d08327d3a7eb0b21e11e280561
2021-08-02 05:50:49 +00:00
Rikin Kachhia
b713d9b13f docs: misc fixes
https://github.com/hasura/graphql-engine-mono/pull/1969

GitOrigin-RevId: 755b0954cffc6d14fa04bca590318b8756037b4f
2021-07-31 10:10:52 +00:00
Evie Ciobanu
e48ccd7fab server: Check session variables for subscriptions
https://github.com/hasura/graphql-engine-mono/pull/1879

GitOrigin-RevId: 78d3384cb21a36e8b8c85c17ae7578ce0b4230f8
2021-07-30 21:42:52 +00:00
Antoine Leblanc
c5face545c Clean some instances
This PR:
- removes a dependency on Postgres' `ToSQL` in other backends
- removes some usage of `unsafePerformIO` in `FronJSON` / `Arbitrary`
- fixes a `Set` into a `HashSet`
- moves some orphan instances where they belong:
  - alongside others in `Hasura.Incremental` for `Cacheable`
  - in `Hasura.Base.Instances` for `Hashable`
- introduces a local wrapper around ByteString to avoid unsound UTF8 instances

Some of the weird empty lines come from the fact that this PR is an offshoot of #1947.

https://github.com/hasura/graphql-engine-mono/pull/1949

GitOrigin-RevId: ef9d34452946f8466878d8fdda857b0b43816de7
2021-07-30 15:43:32 +00:00
hasura-bot
857d36546b docs: update auth0 integration guide
GITHUB_PR_NUMBER: 6495
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6495

https://github.com/hasura/graphql-engine-mono/pull/415

Co-authored-by: Omer <6780529+omerman@users.noreply.github.com>
GitOrigin-RevId: c06762af65279ac1c72771bac2a7f726cdfb7949
2021-07-30 12:47:44 +00:00
David Overton
1abb1dee69 Remote Schema Customization take 2 using parser tranformations
https://github.com/hasura/graphql-engine-mono/pull/1740

GitOrigin-RevId: e807952058243a97f67cd9969fa434933a08652f
2021-07-30 11:33:59 +00:00
Aniket Deshpande
61663ec901 MSSQL: __typename error and json based aggregates (graphql-engine#7130)
https://github.com/hasura/graphql-engine-mono/pull/1930

GitOrigin-RevId: f14df470ffa298c18e006c522d6355298041ae8e
2021-07-30 09:03:57 +00:00
Antoine Leblanc
8adc8abf0f kill Arbitrary (fix #1736)
Delete all weird Arbitrary things from our codebase.

https://github.com/hasura/graphql-engine-mono/pull/1947

GitOrigin-RevId: b6d48db78d2ef4ac2fd232c684ff5039dc345fc4
2021-07-30 07:55:37 +00:00
Aishwarya Rao
d415fae122 docs: GitHub integration docs
This PR includes addition of github integrations docs to the existing cloud docs

https://github.com/hasura/graphql-engine-mono/pull/1808

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rishichandra Wawhal <27274869+wawhal@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
Co-authored-by: vaishnavigvs <85152989+vaishnavigvs@users.noreply.github.com>
GitOrigin-RevId: dfc4a5e02f51a20a0c4e2111987139932eef68f6
2021-07-29 15:47:31 +00:00
Aravind K P
899e4bab60 Revert "ci: push cli-ext binary to cdn on tag release"
https://github.com/hasura/graphql-engine-mono/pull/1939

GitOrigin-RevId: 8d078dd6e457cdcbdb9806b1d9b037ac7705ff35
2021-07-29 14:06:21 +00:00
Nicolas Beaussart
1b10f275d2 console: add template gallery
https://github.com/hasura/graphql-engine-mono/pull/1923

GitOrigin-RevId: 88f8f276c79ea61ba38070c582bd02468e6593e2
2021-07-29 13:51:45 +00:00
Tirumarai Selvan
3089a385f1 tag release v2.0.4
https://github.com/hasura/graphql-engine-mono/pull/1936

GitOrigin-RevId: 0e1c97f8b8f0223a17712f870cf304004621948f
2021-07-29 12:03:53 +00:00
Auke Booij
3607f472b5 server: build graphql schema without arrows
https://github.com/hasura/graphql-engine-mono/pull/1827

GitOrigin-RevId: 8099ea708283647221973fbfc2c50e89d751efdb
2021-07-29 10:32:02 +00:00
Divi
28788f4b0b cli: add VERSION env to pin cli version
https://github.com/hasura/graphql-engine-mono/pull/1845

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: f12ab6ef5a3aa1ee5181f5ddbf16f7232ef2874e
2021-07-29 09:21:57 +00:00
Naveen Naidu
f49e13c890 server: SQL query tags for GQL operations (closes #400)
https://github.com/hasura/graphql-engine-mono/pull/1393

GitOrigin-RevId: f867c16d8281865dac38c91f7dfcbf5815de898c
2021-07-29 08:30:10 +00:00
Divi
80846d36b7 cli: add support for query_tags metadata object
- add support for query_tags metadata object
- fix filename for cron_triggers metadata object

https://github.com/hasura/graphql-engine-mono/pull/1901

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: d9266d723f06d11d92f156f70660e0122412e41a
2021-07-29 07:22:25 +00:00
Vijay Prasanna
76dc3ed100 console: pro console build fails
https://github.com/hasura/graphql-engine-mono/pull/1928

Co-authored-by: Sooraj <8408875+soorajshankar@users.noreply.github.com>
GitOrigin-RevId: e80c247840e4e29d66efc17631580b833ee0efe7
2021-07-29 06:25:48 +00:00
surendran82
cad0b4bbba docs: remove thin banner strip
https://github.com/hasura/graphql-engine-mono/pull/1911

GitOrigin-RevId: 4d1c1efabc6e87a3920fd6a42ee9fbe30d710bb5
2021-07-28 08:18:41 +00:00
Rakesh Emmadi
a63fa18d9c server/postgres: Support computed fields in permission check/filter
https://github.com/hasura/graphql-engine-mono/pull/1697

GitOrigin-RevId: 6cdf8acc90d3fd97d20a3ee68c84306c3f589370
2021-07-28 08:10:25 +00:00
Kali Vara Purushotham Santhati
ca567bf8cb cli: enhance e2e tests
- actions use-codegen
    - Assert if starter kit files are created
- metadata apply
    - Assert server metadata after apply
    - assert that --dry-run flag will not modify metadata on server
- metadata clear
    - Assert with server metadata that operation was successful.
- metadata inconsistency drop
    - Assert with server metadata that operation was successful.
- metadata inconsistency status
    - Assert for all possible states
- metadata reload
    - Assert effect of operation with server
- migrate and seed subcommands
    - Add tests for MSSQL sources
    - Structure tests in such a way that it’s easy to add tests for new sources

https://github.com/hasura/graphql-engine-mono/pull/1693

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: fcdbb806d105978a07487a40f7fa6e16b3ab8816
2021-07-28 06:45:03 +00:00
Rakesh Emmadi
5cfac6ea87 server/postgres: support computed fields in order by
https://github.com/hasura/graphql-engine-mono/pull/1793

GitOrigin-RevId: e0396c0d4d96fc8f9bdbd7567193933db5b295a6
2021-07-27 16:28:23 +00:00
Anon Ray
e4155e4c5b server: log post drop-source hook errors instead of throwing
https://github.com/hasura/graphql-engine-mono/pull/1724

GitOrigin-RevId: 659d9335861b71ee6ed551eedfb0926d16c9ac3d
2021-07-27 15:15:47 +00:00
Antoine Leblanc
a978b6d683 Remove several outdated backend constraints
## Description

This PR removes as many constraints as possible from Backend without refactoring the code. Thanks to #1844, a few ToJSON functions can be removed from the IR, and several constraints were simply redundant.

This PR borrows from similar work done as part of #1666.

## Note

To remove constraints more aggressively, I have explored the possibility of _removing Representable altogether_, in a [separate commit](https://github.com/hasura/graphql-engine-mono/compare/nicuveo/remove-extension-constraints..nicuveo/tentative-remove-representable). I am not convinced it's a good idea in terms of readability of the code, but it's a possibility.

Further work includes deciding what we want to do with `Show` and `ToTxt`; see #1747.

https://github.com/hasura/graphql-engine-mono/pull/1843

GitOrigin-RevId: 337324ad90cb8f86f06e1c5a36aa44bb414e195a
2021-07-27 13:52:20 +00:00
Auke Booij
7bead93827 server: remove remnants of query plan caching (fix #1795)
Query plan caching was introduced by - I believe - hasura/graphql-engine#1934 in order to reduce the query response latency. During the development of PDV in hasura/graphql-engine#4111, it was found out that the new architecture (for which query plan caching wasn't implemented) performed comparably to the pre-PDV architecture with caching. Hence, it was decided to leave query plan caching until some day in the future when it was deemed necessary.

Well, we're in the future now, and there still isn't a convincing argument for query plan caching. So the time has come to remove some references to query plan caching from the codebase. For the most part, any code being removed would probably not be very well suited to the post-PDV architecture of query execution, so arguably not much is lost.

Apart from simplifying the code, this PR will contribute towards making the GraphQL schema generation more modular, testable, and easier to profile. I'd like to eventually work towards a situation in which it's easy to generate a GraphQL schema parser *in isolation*, without being connected to a database, and then parse a GraphQL query *in isolation*, without even listening any HTTP port. It is important that both of these operations can be examined in detail, and in isolation, since they are two major performance bottlenecks, as well as phases where many important upcoming features hook into.

Implementation

The following have been removed:
- The entirety of `server/src-lib/Hasura/GraphQL/Execute/Plan.hs`
- The core phases of query parsing and execution no longer have any references to query plan caching. Note that this is not to be confused with query *response* caching, which is not affected by this PR. This includes removal of the types:
- - `Opaque`, which is replaced by a tuple. Note that the old implementation was broken and did not adequately hide the constructors.
- - `QueryReusability` (and the `markNotReusable` method). Notably, the implementation of the `ParseT` monad now consists of two, rather than three, monad transformers.
- Cache-related tests (in `server/src-test/Hasura/CacheBoundedSpec.hs`) have been removed .
- References to query plan caching in the documentation.
- The `planCacheOptions` in the `TenantConfig` type class was removed. However, during parsing, unrecognized fields in the YAML config get ignored, so this does not cause a breaking change. (Confirmed manually, as well as in consultation with @sordina.)
- The metrics no longer send cache hit/miss messages.

There are a few places in which one can still find references to query plan caching:

- We still accept the `--query-plan-cache-size` command-line option for backwards compatibility. The `HASURA_QUERY_PLAN_CACHE_SIZE` environment variable is not read.

https://github.com/hasura/graphql-engine-mono/pull/1815

GitOrigin-RevId: 17d92b254ec093c62a7dfeec478658ede0813eb7
2021-07-27 11:52:43 +00:00
Antoine Leblanc
cc6c86aeab Clean metadata arguments
## Description

Thanks to #1664, the Metadata API types no longer require a `ToJSON` instance. This PR follows up with a cleanup of the types of the arguments to the metadata API:
- whenever possible, it moves those argument types to where they're used (RQL.DDL.*)
- it removes all unrequired instances (mostly `ToJSON`)

This PR does not attempt to do it for _all_ such argument types. For some of the metadata operations, the type used to describe the argument to the API and used to represent the value in the metadata are one and the same (like for `CreateEndpoint`). Sometimes, the two types are intertwined in complex ways (`RemoteRelationship` and `RemoteRelationshipDef`). In the spirit of only doing uncontroversial cleaning work, this PR only moves types that are not used outside of RQL.DDL.

Furthermore, this is a small step towards separating the different types all jumbled together in RQL.Types.

## Notes

This PR also improves several `FromJSON` instances to make use of `withObject`, and to use a human readable string instead of a type name in error messages whenever possible. For instance:
- before: `expected Object for Object, but encountered X`
  after: `expected Object for add computed field, but encountered X`
- before: `Expecting an object for update query`
  after: `expected Object for update query, but encountered X`

This PR also renames `CreateFunctionPermission` to `FunctionPermissionArgument`, to remove the quite surprising `type DropFunctionPermission = CreateFunctionPermission`.

This PR also deletes some dead code, mostly in RQL.DML.

This PR also moves a PG-specific source resolving function from DDL.Schema.Source to the only place where it is used: App.hs.

https://github.com/hasura/graphql-engine-mono/pull/1844

GitOrigin-RevId: a594521194bb7fe6a111b02a9e099896f9fed59c
2021-07-27 10:42:51 +00:00
Divi
00902e322e ci: push cli-ext binary to cdn on tag release
https://github.com/hasura/graphql-engine-mono/pull/1846

GitOrigin-RevId: 1f1d61c88925d412c38d2e790c30de96541b6cc9
2021-07-27 09:13:49 +00:00
Sameer Kolhar
454e6afd1d server: fix pg_invoke_event_trigger regression
https://github.com/hasura/graphql-engine-mono/pull/1785

GitOrigin-RevId: 0addb457c3790f886b4d708ffc08588aebfc6aca
2021-07-27 08:06:25 +00:00
Sooraj
af9dfd3554 console: show error message on inconsistent objects table
https://github.com/hasura/graphql-engine-mono/pull/1886

GitOrigin-RevId: 074b1f54b6ed3505892b5db3466592333ba1207a
2021-07-27 06:56:52 +00:00
Sameer Kolhar
6d7ec06502 server: update the logging strategy for inconsistent metadata
https://github.com/hasura/graphql-engine-mono/pull/1776

GitOrigin-RevId: 44a8e3b2b8d515aa240905fb07e52add4d565b4d
2021-07-27 05:42:05 +00:00