Commit Graph

4108 Commits

Author SHA1 Message Date
Abhijeet Khangarot
628af0db19 console: handle console crash on action relationships with scalar output type
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4028
GitOrigin-RevId: 33eb02569cd1258495ae7703c67fa2183a082af1
2022-03-25 06:25:30 +00:00
Varun Choudhary
3879e65e7d console: add relationships tab on remote schema [CON-58]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3852
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: 275df81b75cf3db255b25a8adf2c1e7df9e31ded
2022-03-24 22:16:01 +00:00
Divya Bhushan
4f2fb51fbc docs: add console/cli workflows on remote source relationships page
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3670
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: 3c2315fb90896e3780476d14e224ed868e572d04
2022-03-24 15:05:53 +00:00
Divya Bhushan
d4d5e3d50a docs: REST connectors for Event Triggers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3606
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: e95567a316e088245d55044194260784136e3b6d
2022-03-24 12:34:19 +00:00
Puru Gupta
6ad050a29c multitenant: fix concurrent metadata init (closes #3819)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3983
GitOrigin-RevId: 6fa30a68b1f3d450e9da7b722b9e4938c71e7091
2022-03-24 11:51:59 +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
jkachmar
adb648b429 server: Rework internal webhook request transform components
## Description

Some of the documentation/organizational changes I was putting into the suggestions for #3624 were a bit too convoluted for GitHub's suggestion interface, so I'm putting them here instead.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3910
Co-authored-by: Solomon <24038+solomon-b@users.noreply.github.com>
GitOrigin-RevId: 06e0cb08bd18e7f8b21452df0697cfd80bc56fde
2022-03-23 20:24:44 +00:00
Matt Hardman
69da592c3e CON-32-add-a-remote-schema-relationship-widget
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3998
Co-authored-by: Alberto Francesco Motta <36401353+afmotta@users.noreply.github.com>
GitOrigin-RevId: 097b6659d2e67bd553209fa7821c45e4dfebf1f0
2022-03-23 19:12:34 +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
Sooraj
e79aa185f9 console: document console development tooling [CON-90]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3994
GitOrigin-RevId: 2b4219048c62b480c78ce1547facb2b6da7bf0dc
2022-03-23 05:39:29 +00:00
Vaishnavi
739b1d5223 docs: update cloud heroku integration page
`no-changelog-required`

### Affected components

- [x] Docs

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2326
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>
GitOrigin-RevId: 7b9308456a74e95e333fd64f137a97428e30ceba
2022-03-22 12:07:59 +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
Karthikeyan Chinnakonda
a13ed140e8 server: refactor the term "live query" to "subscription"
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4001
GitOrigin-RevId: 78a7ff5c88ac3751baa5e2b3ac6ee73b94c50051
2022-03-21 10:40:49 +00:00
Solomon
c81d9f6962 Ignore Use <$> hlint rule
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3999
GitOrigin-RevId: 07e6653893c6dc146035af947d7a78be7cee6fc1
2022-03-19 00:30:54 +00:00
Nicolas Beaussart
f5fa832d24 Add the hook layer for the feature flags
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4014
Co-authored-by: Abhijeet Khangarot <26903230+abhi40308@users.noreply.github.com>
GitOrigin-RevId: 2acd2d638f0126e6d7dd12a92e086da32caf71a7
2022-03-18 14:43:22 +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
hasura-bot
810c94c776 community: add nextjs-incremental-static-regeneration
GITHUB_PR_NUMBER: 8320
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/8320

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3976
Co-authored-by: arjunyel <11153289+arjunyel@users.noreply.github.com>
GitOrigin-RevId: a3d8f705900c814a3f2017b239b86960943c8677
2022-03-17 11:53:17 +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
hasura-bot
250a280132 docs: fix column type in migrations setup example
GITHUB_PR_NUMBER: 8312
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/8312

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3966
Co-authored-by: #кодеротбога <1025241+comerc@users.noreply.github.com>
GitOrigin-RevId: 0b085bddc7ed097000594f7a17425951d73deff8
2022-03-16 14:38:30 +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
Sheila Babadi
0d2fef38b8 docs: update cloud docs for switching from standard to free tier
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3922
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: 1deaa3c300a7654f326bea78b333a4ccc890c7f4
2022-03-16 12:04:02 +00:00
Rakesh Emmadi
d7b6585454 server/gardening: move local hoogle setup from Makefile to bash script
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3996
GitOrigin-RevId: ace7f4c13cab6e549aedf4520334c435acac9ab1
2022-03-16 10:44:01 +00:00
hasura-bot
d203ef940b migrate realtime poll sample app to graphql-ws
GITHUB_PR_NUMBER: 8295
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/8295

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3936
Co-authored-by: Catalin Pit <25515812+catalinpit@users.noreply.github.com>
GitOrigin-RevId: 186bd1729f5b92af030716299c22f61dd7fe0bb5
2022-03-16 08:19:13 +00:00
Rakesh Emmadi
62304312e8 server: add Makefile targets and instructions to run local hoogle server
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3973
GitOrigin-RevId: 986955e3c74d9ec581e9cad37198cc9c1db34037
2022-03-16 06:35:13 +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
Solomon
94331e23f5 GDW-15 Serializable Types
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3924
GitOrigin-RevId: 75b276edcd2d1f88bbdbed1b96b08708f9c68450
2022-03-16 04:13:08 +00:00
jkachmar
647231b685 Yeet some default-extensions
Manually enables:
* EmptyCase
* ExistentialQuantification
* QuantifiedConstraints
* QuasiQuotes
* TemplateHaskell
* TypeFamilyDependencies

...in the following components:
* 'graphql-engine' library
* 'graphql-engine' 'src-test'
* 'graphql-engine' 'tests/integration'
* 'graphql-engine' tests-hspec'

Additionally, performs some light refactoring and documentation.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3991
GitOrigin-RevId: 514477d3466b01f60eca8935d0fef60dd0756838
2022-03-16 00:40:17 +00:00
Gil Mizrahi
c9e80cbfaf tests-hspec refactor + use the new Harness.Test.Schema setup mechanism for the column presets test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3953
GitOrigin-RevId: 02b5fe53d1133c5600a6ad5e55d006f461e6ad87
2022-03-15 16:09:52 +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
Antoine Leblanc
f1ef8338ee Fix not detecting collisions between remote relationships for the unauthenticated context.
### Description

This very small PR fixes an error introduced in #3811, when changing the collision detection code: we were properly doing collision detection for remote schemas for the unauthenticated context, and also removing remote relationships... but then we were not using the result to build the schema.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3986
GitOrigin-RevId: 26a5553bf82574f2764fd594b0616dfea95a4757
2022-03-15 15:14:07 +00:00
Karthikeyan Chinnakonda
a2d4724ae4 server: optimization of recreating event triggers only when needed
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3980
GitOrigin-RevId: ac882489d125436423315ee0e055198e96d0998c
2022-03-15 13:01:36 +00:00
Karthikeyan Chinnakonda
c6a7f4c488 server: remove the extraneous drop function while creating an event trigger
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3956
GitOrigin-RevId: 6d97ffce00fe17ca7f15a8e74acbc1b3d974f7b4
2022-03-15 08:42:01 +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
Robert
d8f139e318 server: app init cleanup
- remove an unused return value
- untangle database query logic slightly
- rename printErrExit functions, and use them more consistently
- simplify the top-level exception handling

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3900
GitOrigin-RevId: a6727c6f899aed00e6a04bd822727341fd51acc4
2022-03-14 18:32:40 +00:00
Antoine Leblanc
376c7d48f1 Add remote relationships from remote schemas in schema parser generators
### Description

This PR extends the `RemoteSchema` parsers to also include remote relationships. This include a significant refactoring of the top level schema building blocks, since remote schemas can no longer be built in isolation: they have to be built within the same run of `MonadSchema` as the sources. It is originally taken from the changes in #3069 and was slightly adapted.

I highly recommend turning OFF whitespace in the Github UI for `Schema.hs`, since I've adjusted the indentation of two large functions.

### Warning

Given the lack of a feature flag, this PR technically **enables the feature**. While the metadata API is not plugged in, a savvy user could use `replace_metadata` to set a metadata that contains remote joins from remote schemas, and they would be enabled. Is this acceptable?

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3811
GitOrigin-RevId: a5b00f865cdb8890b0fc02b139c2ebd48929f138
2022-03-14 16:22:50 +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
Varun Choudhary
073b9c33f9 console: fixed an issue where db to db relationship where not removed from the list after deletion [CON-64]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3928
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: 6d3e1af3df9928bccc98036dfa0252110a4a11a9
2022-03-14 12:47:21 +00:00
Varun Choudhary
773b5808fa console: pass only current schema table to local table relationships
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3932
GitOrigin-RevId: 8b4a3821f65457aafe6008b2473d047a95da130b
2022-03-14 12:03:46 +00:00
Rakesh Emmadi
b844c5d732 server/tests: unify HASURA_BIGQUERY_SERVICE_KEY and HASURA_BIGQUERY_SERVICE_ACCOUNT env vars
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3914
GitOrigin-RevId: 66f75420504d1b864b91599c2bdaa832784bb956
2022-03-14 07:50:35 +00:00
Solomon
cf820852b6 Adds a warning about downgrading with v2 webhook schemas
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3913
Co-authored-by: Tirumarai Selvan <8663570+tirumaraiselvan@users.noreply.github.com>
GitOrigin-RevId: 4e19b32ad7b79961fab117f6e4d7617061912808
2022-03-14 06:49:57 +00:00
Rishichandra Wawhal
a21265b489 cloud-docs: bump preview app github action version in cloud docs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3949
GitOrigin-RevId: 96d9ceacd9eb421662d84dfdda48ff58bea78701
2022-03-14 06:16:21 +00:00
Antoine Leblanc
74513e351f Use an enum for EndpointMethod and fix incorrect response aggregation.
### Description

This small PR improves the representation of an endpoint method from `Text` to an enum of the supported methods. Additionally, it cleans some of the instances defined on surrounding types (such as Postgres-specific instances on Endpoint types).

Due to a name conflict, this makes `RQL.Types.Endpoint` impossible to re-export from `RQL.Types`, which in turn forces several other modules to import it explicitly, which I think is fine since we want to ultimately get rid of `RQL.Types`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3965
GitOrigin-RevId: 33869007d0d818ddf486fb61d1f6099f9dad7570
2022-03-13 07:41:02 +00:00
David Overton
ac87eff905 Document ActionFieldsG
<!-- Thank you for ss in the Title above ^ -->

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

Add some documentation on `ActionFieldG` type.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3945
GitOrigin-RevId: d9543ed7a8fe3ccfe9f5267c3a2ac71fb040f4db
2022-03-12 01:38:19 +00:00