Commit Graph

805 Commits

Author SHA1 Message Date
Rikin Kachhia
127bdcdf5c console: enable mssql aggregation query permissions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4125
GitOrigin-RevId: c57c1f6cff409033ec8e73297ddcc8235cf71d52
2022-03-31 12:39:19 +00:00
Aravind K P
649ef41e3c cli: fix remote schema formatting errors in metadata
closes https://github.com/hasura/graphql-engine/issues/7608
closes https://github.com/hasura/graphql-engine/issues/7459

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3951
GitOrigin-RevId: bad3505c79fab10453580a6a43ad7e71bc2d3753
2022-03-31 08:28:30 +00:00
Rakesh Emmadi
22a5ebf287 server/bigquery: improve throwing upstream exceptions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4095
GitOrigin-RevId: e19ffe058aaffa1cfa8d155f2e3a6ecafd6aab13
2022-03-30 13:54:18 +00:00
Vishnu Bharathi
a3c707b718 ci: tag release v2.4.0 and v2.5.0-beta.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4106
GitOrigin-RevId: 83594358cf511e7b5e1cd7d48a28e3e397a20682
2022-03-30 07:33:44 +00:00
Rikin Kachhia
cb75226cf1 update changelog for v2.5.0-beta
<!-- Thank you for ss in the Title above ^ -->

## Description ✍️
<!-- Please fill this se-->
<!-- Describe the changes from a user's perspective -->

update changelog

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4099
Co-authored-by: Tirumarai Selvan <8663570+tirumaraiselvan@users.noreply.github.com>
GitOrigin-RevId: 5ac6a6bd36f2d0ebf7bd6873a0ea1d297fb92fe1
2022-03-30 04:03:19 +00:00
Daniel Chambers
5873429e54 console: Improved computed field comment support [CON-94]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3946
Co-authored-by: Sooraj <8408875+soorajshankar@users.noreply.github.com>
Co-authored-by: Varun Choudhary <68095256+Varun-Choudhary@users.noreply.github.com>
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: dfedf0f76c008b958630f66b58a59530e567a23d
2022-03-29 09:21:28 +00:00
Vijay Prasanna
9ba1e3993e console: Fix REST live preview malformed request
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4005
GitOrigin-RevId: 0c16c3804a047061f3a798f48024161c07323c48
2022-03-25 09:56:06 +00:00
Sooraj
df23bdb5f0 console: redirect to metadata status page on conflicting inherited role [CON-95]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4063
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: cdf5f835f9bf641f2f8d8e356403e3bfd2352f5a
2022-03-24 08:15:10 +00:00
Daniel Chambers
cb1722694e console: Support custom comments for root fields
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3930
Co-authored-by: Martin Mark <74692114+martin-hasura@users.noreply.github.com>
GitOrigin-RevId: 91c71d8ab2c4886b395f5237ca71cace9ec61d1a
2022-03-24 00:30:52 +00:00
Vishnu Bharathi
1a60d4f7f4 ci: tag release v2.4.0-beta.3 and v2.4.0-beta.3-pro.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4052
Co-authored-by: Tirumarai Selvan <8663570+tirumaraiselvan@users.noreply.github.com>
GitOrigin-RevId: 99c03ed16d624f50bc71cd47417f024c1c7586d9
2022-03-23 11:18:22 +00:00
Alberto Francesco Motta
121f183231 Add Feature Flags section in Settings
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4018
GitOrigin-RevId: 418fe0c10b5f1ce17a984399a3f773a9a76f83ea
2022-03-23 10:57:17 +00:00
Vishnu Bharathi
fac5e0b2c3 ci: produce ubuntu and centos flavoured graphql-engine images
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3597
GitOrigin-RevId: f1fded72524f28f41433eea6819276932ee0b5cb
2022-03-22 12:03:25 +00:00
Antoine Leblanc
5920134dcb Decouple Analyse and OpenAPI from remote schema introspection and internal execution details.
### Motivation

#2338 introduced a way to validate REST queries against the metadata after a change, to properly report any inconsistency that would emerge from a change in the underlying structure of our schema. However, the way this was done was quite complex and error-prone. Namely: we would use the generated schema parsers to statically execute an introspection query, similar to the one we use for remote schemas, then parse the resulting bytestring as it were coming from a remote schema.

This led to several issues: the code was using remote schema primitives, and was associated with remote schema code, despite being unrelated, which led to absurd situations like creating fake `Variable`s whose type was also their name. A lot of the code had to deal with the fact that we might fail to re-parse our own schema. Additionally, some of it was dead code, that for some reason GHC did not warn about? But more fundamentally, this architecture decision creates a dependency between unrelated pieces of the engine: modifying the internal processing of root fields or the introspection of remote schemas now risks impacting the unrelated `OpenAPI` feature.

### Description

This PR decouples that process from the remote schema introspection logic and from the execution engine by making `Analyse` and `OpenAPI` work on the generic `G.SchemaIntrospection` instead. To accomplish this, it:
- adds `GraphQL.Parser.Schema.Convert`, to convert from our "live" schema back to a flat `SchemaIntrospection`
- persists in the schema cache the `admin` introspection generated when building the schema, and uses it both for validation and for generating the `OpenAPI`.

### Known issues and limitations

This adds a bit of memory pressure to the engine, as we persist the entire schema in the schema cache. This might be acceptable in the short-term, but we have several potential ideas going forward should this be a problem:
- cache the result of `Analyze`: when it becomes possible to build the `OpenAPI` purely with the result of `Analyze` without any additional schema information, then we could cache that instead, reducing the footprint
- caching the `OpenAPI`: if it doesn't need to change every time the endpoint is queried, then it should be possible to cache the entire `OpenAPI` object instead of the schema
- cache a copy of the `FieldParsers` used to generate the schema: as those are persisted through the GraphQL `Context`, and are the only input required to generate the `Schema`, making them accessible in the schema cache would allow us to have the exact same feature with no additional memory cost, at the price of a slightly slower and more complicated process (need to rebuild the `Schema` every time we query the OpenAPI endpoint)
- cache nothing at all, and rebuild the admin schema from scratch every time.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3962
Co-authored-by: paritosh-08 <85472423+paritosh-08@users.noreply.github.com>
GitOrigin-RevId: a8b9808170b231fdf6787983b4a9ed286cde27e0
2022-03-22 07:37:49 +00:00
Philip Lykke Carlsen
23520f67d0 (Fix #8267) Handle subscriptions in MSSQL when results exceed 2048 characters
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3959
GitOrigin-RevId: ea037c9dc4392d1b98ee086f6c87f79ce8ea5c8f
2022-03-21 12:16:14 +00:00
Gil Mizrahi
f06bff4008 server/mssql: respect custom field names in delete, insert and update mutations
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3987
GitOrigin-RevId: c1c4e32c7553e9f1febd55cd4ed49d8c1a83ea03
2022-03-18 10:05:49 +00:00
Antoine Leblanc
ccea1da1d5 Enable and test remote relationships from remote schemas.
### Description

This is it! This PR enables the Metadata API for remote relationships from remote schemas, adds tests, ~~adds documentation~~, adds an entry to the Changelog. This is the release PR that enables the feature.

### Checklist
- [ ] Tests:
  - [x] RS-to-Postgres (high level)
  - [x] RS-to-RS (high level)
  - [x] From RS specifically (testing for edge cases)
  - [x] Metadata API tests
  - [ ] Unit testing the actual engine?
- [x] Changelog entry
- [ ] Documentation?

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3974
Co-authored-by: Vamshi Surabhi <6562944+0x777@users.noreply.github.com>
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
Co-authored-by: jkachmar <8461423+jkachmar@users.noreply.github.com>
GitOrigin-RevId: c9aebf12e6eebef8d264ea831a327b968d4be9d2
2022-03-17 20:54:57 +00:00
Vishnu Bharathi
59be818d3a ci: tag release v2.3.1 and v2.4.0-beta.2
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3989
Co-authored-by: Tom Skawinski <98830547+tomhasura@users.noreply.github.com>
GitOrigin-RevId: 65a992e9d44093596d72fbd64acc37518b8ca911
2022-03-17 07:44:42 +00:00
Varun Choudhary
7eb59330b1 console: call dependentSQLGenerator while adding column to a table from modify tab
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3995
GitOrigin-RevId: 5acba7950cdccd2cc1f8a2f8c6b4b16153cd06f0
2022-03-16 13:41:58 +00:00
Sooraj
d1cdb9f0ae console: disable search indexing with HTML meta tag [CON-28]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3948
GitOrigin-RevId: 5af852fd7c9c131fc85c05f97c601058c99e6dcc
2022-03-16 05:51:47 +00:00
Gil Mizrahi
4cd72d738a Improve changelog entry for 8221
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3985
GitOrigin-RevId: c1c2a56ff1e73be09ec43e1a1469a73f3c8a6bcb
2022-03-15 15:17:18 +00:00
Daniel Chambers
69501b2657 server: Use max-age when refreshing JWKs if must-revalidate is present
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3979
GitOrigin-RevId: 5f5ebfb25ff9729e34397084d86b0fe968099b25
2022-03-15 07:36:43 +00:00
David Overton
2a934df0bc Fix bad changelog merge after v2.2.2 release
Fix changelog merge from 2.2.2

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3977
GitOrigin-RevId: 19f0d9b4362cf988c0b156a7b7125969f4ce984f
2022-03-15 05:34:22 +00:00
Gil Mizrahi
92ab93775f server/mssql: Implement column presets
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3856
GitOrigin-RevId: 8527749c33df1a5bdde29338630714e673e308ab
2022-03-14 15:35:15 +00:00
Rishichandra Wawhal
bd05e242d5 console: data sidebar table search
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3826
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
Co-authored-by: Abhijeet Khangarot <26903230+abhi40308@users.noreply.github.com>
GitOrigin-RevId: a7de40686c9d3f1551e84aeec376ff143935a97a
2022-03-14 13:49:44 +00:00
Solomon
ca85acbfe3 Feature/improved webhook debug endpoint errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3782
Co-authored-by: Abhijeet Khangarot <26903230+abhi40308@users.noreply.github.com>
GitOrigin-RevId: 404197e766efa94a1814e8a0287cd55d9175f2a7
2022-03-10 23:23:55 +00:00
Vishnu Bharathi
2e04bd5ac2 cli: add support for customization field in sources metadata
closes https://github.com/hasura/graphql-engine/issues/8292

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3954
GitOrigin-RevId: cc27dcffbb71579136a3cae7d99ecd239eb37ed2
2022-03-10 16:47:03 +00:00
Aravind K P
2ff0f25e08 cli: refactor metadataobject package
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3943
GitOrigin-RevId: 4cc8f67dd8b6ba0e78f1c35d415f89bd1b901705
2022-03-10 08:13:50 +00:00
hasura-bot
4ec9229f15 add jsonb to string cast support for postgres (fix #6577, #2602)
GITHUB_PR_NUMBER: 7818
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7818

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2898
Co-authored-by: Teo Stocco <9053709+zifeo@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
GitOrigin-RevId: 1100f3ce44ea07867a2d7de5b6bb059510f100e1
2022-03-10 07:32:59 +00:00
Daniel Chambers
a8424c48a1 Customize column GraphQL schema descriptions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3888
GitOrigin-RevId: 027c319a66671a44fc6e5506bdfc9d2c10a8569f
2022-03-09 06:35:46 +00:00
Rakesh Emmadi
aa19f1e0d0 server/postgres: improve fetching tables' and functions' metadata (from database)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3778
GitOrigin-RevId: 13bb97bdb7afad265db899f368c74d9f240b214a
2022-03-08 13:03:14 +00:00
paritosh-08
0775c00b0d server: add validation for query collections
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3658
GitOrigin-RevId: 3c644da15c92cac16356985d0fe0c6adb7001862
2022-03-08 09:49:18 +00:00
David Overton
2792f515d4 Traverse variables in action remote joins
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3864
GitOrigin-RevId: 0fb624260db46474056ee323638d9be7d074b3fc
2022-03-08 08:23:20 +00:00
Solomon
d67d4e2310 Webhook Transform Cleanup / Refactor
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3624
GitOrigin-RevId: 849e6dd70d6fe3d84056a485b20928ff813881d4
2022-03-08 00:43:08 +00:00
Rakesh Emmadi
878f6108e6 server/bigquery: apply 'order by' to 'array_agg' projection inside an array relationship join sub-query
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3824
GitOrigin-RevId: b1739c35fb2c387152729d3ff72c6ff7ef9b9118
2022-03-07 10:13:02 +00:00
Vishnu Bharathi
e73f187db4 ci: tag release v2.2.2 and v2.2.2-pro.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3889
GitOrigin-RevId: 84abcfe6070e39ae3a85a3ff0098eff18d93e278
2022-03-07 08:35:13 +00:00
Auke Booij
2abe02c672 Fix #3635
In hasura/graphql-engine#5144, we noticed that having remote relationships in the schema is problematic for Relay. In particular, we don't support remote schemas in Relay at all, and because of this, remote relationships were also broken.

The fix was easy: when we're building the schema for Relay, whenever we encounter a remote relationship in our configuration, we simply skip building that field. The implementation was easy: (see hasura/graphql-engine#5145)
```diff
-    SFRemoteRelationship info -> pure $ mkRemoteRelationshipFld info
+    SFRemoteRelationship info ->
+      -- https://github.com/hasura/graphql-engine/issues/5144
+      if isRelay then [] else pure $ mkRemoteRelationshipFld info
```
A test case was added in that PR to prevent us from accidentally re-including remote relationships in the Relay schema. (However, it now looks like that test case does not function correctly.)

The above code was later refactored in #3037, making use of the `MaybeT` effect. However, this effect was not used correctly, so that the result of the check was ignored.

This fixes the code to use the `MaybeT` effect correctly.

CC @0x777 @rakeshkky

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3868
GitOrigin-RevId: e528303e01eacf60173cba1eec1898986cf12359
2022-03-03 15:01:25 +00:00
paritosh-08
a0c83b8e99 server: add inconsistency information in reload_metadata API call
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3860
GitOrigin-RevId: 02d1963946d69fdf6886aa61806eb71db60f8931
2022-03-03 13:34:44 +00:00
David Overton
1eb7fe5999 Nested action joins
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3613
GitOrigin-RevId: 95fdb317a1052bdc440865f2dc8c5897e8531539
2022-03-03 03:44:20 +00:00
Solomon
876300c049 Adds x-www-form-urlencoded body transformation
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3764
GitOrigin-RevId: 60ce63496d94406476dd446a498d7a7d625465be
2022-03-02 19:43:22 +00:00
Vishnu Bharathi
eed47e973a ci: tag release for v2.3.0 and v2.4.0-beta.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3853
Co-authored-by: Alberto Francesco Motta <36401353+afmotta@users.noreply.github.com>
GitOrigin-RevId: ce28cdb679e6c2dda85c7309f81ee19f5f8ab714
2022-03-02 14:01:17 +00:00
Varun Choudhary
c82fdc4253 console: fixed an issue where cron triggers where not removed from the list after deletion
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3838
Co-authored-by: Alberto Francesco Motta <36401353+afmotta@users.noreply.github.com>
GitOrigin-RevId: ebfe928fb6c966898ad88d97f114abf500a6af19
2022-03-02 09:28:08 +00:00
Rikin Kachhia
8b88d15f06 console: only show tables from current schema in clone permissions section
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3823
Co-authored-by: Varun Choudhary <68095256+Varun-Choudhary@users.noreply.github.com>
GitOrigin-RevId: ec47f1578c89bea42fbe5db0b742a7058604c4b8
2022-03-02 06:11:40 +00:00
Solomon
deb3baa504 Bug fix/webhook transforms header filtering
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3795
Co-authored-by: Lyndon Maydwell <92299+sordina@users.noreply.github.com>
Co-authored-by: Tirumarai Selvan <8663570+tirumaraiselvan@users.noreply.github.com>
GitOrigin-RevId: 60becefedebbc89a9580c7989a0212903a843d25
2022-03-01 22:55:46 +00:00
Abhijeet Khangarot
0d120471cd console: provide checkbox to remove body in rest connectors v2
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3544
GitOrigin-RevId: 2beb58f09577bda72470fb0deb1099287ab4c8a9
2022-03-01 15:22:03 +00:00
Vishnu Bharathi
661bfeb153 ci: tag release v2.3.0-beta.3 and v2.3.0-beta.3-pro.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3821
GitOrigin-RevId: 1220a68e4a03f22814dad2cc8b556a3a32b6f0f4
2022-02-28 13:56:51 +00:00
Varun Choudhary
9ca658a4f6 console: show an error notification if Hasura CLI migrations fail
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3786
GitOrigin-RevId: f63ccbcd99ad0e992cee9a6029a1f9af02ef1d1b
2022-02-28 10:47:58 +00:00
Daniel Chambers
0f9f2192a0 server: Customize root field GraphQL schema descriptions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3719
GitOrigin-RevId: b0a9bb6a0f65aac72ca95b66219eec16b2f5a0dd
2022-02-28 07:50:12 +00:00
kodiakhq[bot]
1181625173 server: optimize collectTypeDefinitions and refactor
Numbers from CI for the new (currently noisy) `replace_metadata` adhoc benchmark:

    chinook:      0.19s  ->  0.16
    huge_schema: 36.98s  ->  29.89

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3685
GitOrigin-RevId: be79b666858b03e8407c0d89765e9aac0af8d40a
2022-02-24 18:56:22 +00:00
paritosh-08
bc74046ab2 server: case insensitive lookup in session variable
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3663
GitOrigin-RevId: b36666d8849a23dad209f9921f140390c2b57496
2022-02-24 13:08:35 +00:00
Varun Choudhary
f43704fb4a console: include cron trigger with include in metadata as false on cron trigger manage page
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3745
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: 373c7e60cb4314392861a5a12ac10bbb620fb387
2022-02-24 11:21:36 +00:00