Commit Graph

6262 Commits

Author SHA1 Message Date
Rob Dominguez
f61878cfee docs: restructure server reference page
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6862
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: 4278379b9647f018e7aec1c182f349eca090227b
2023-02-06 16:56:35 +00:00
Auke Booij
bc9bafbecf server: delete unused benchmarking code
As far as I know, and the people who touched this, this is dead code.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7830
GitOrigin-RevId: 2530783951af97033545faf65ad282fd9cdbc3b3
2023-02-06 15:11:10 +00:00
Nicolas Inchauspe
825e5206b4 console: fix telemetry notification reappearing
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7781
GitOrigin-RevId: 33c7873f8f9ff950cb7d45adf7b26b352f7fe1ae
2023-02-06 09:30:24 +00:00
Sameer Kolhar
c27dceb1df console: fix issue with Badge component for Check DB Latency on Data Manager
[CPS-737]: https://hasurahq.atlassian.net/browse/CPS-737?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7804
GitOrigin-RevId: b3b90fd3542d95d0560ded43766d57f81b4e3416
2023-02-06 07:59:38 +00:00
Daniel Chambers
7a4bde9652 Added result_type property to SingleColumnAggregate
[GDC-756]: https://hasurahq.atlassian.net/browse/GDC-756?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7793
GitOrigin-RevId: b8201615984a71a9f41bed4195e2435e362cf383
2023-02-06 04:20:17 +00:00
Stefano Magni
1f469b279b frontend: Clear the slow or flaky Console CE E2E tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7779
GitOrigin-RevId: fda5d58c5739f1069fc5bab94f8bbde1961b7e17
2023-02-05 06:53:50 +00:00
Gil Mizrahi
f90373b1ca NaQI - validate against the database - infra and check syntax
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7778
GitOrigin-RevId: c8366ad7261d9c120dc0612bedb96fa5ae59eda3
2023-02-03 16:29:22 +00:00
Rikin Kachhia
4c37b6838c docs: update cloud section position
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7748
GitOrigin-RevId: d810701ebf679a979d5401a260846d800ade71c0
2023-02-03 15:24:21 +00:00
Daniel Harvey
d3d2d967d2 [server/tests] test server health with /healthz endpoint
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7759
GitOrigin-RevId: 952b64b258a0566a8c393f70e8341e8eccb8d7a4
2023-02-03 15:20:42 +00:00
Stefano Magni
03bf7e8c6f console: programmaticallyTraceError logs to the Console too
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7714
GitOrigin-RevId: 7307093f9db4a871a43011705b42c06332c57d18
2023-02-03 14:46:41 +00:00
Samir Talwar
710a33bf45 CI: Run the Python tests in the "new" mode, one HGE per test class.
Part of [NDAT-257](https://hasurahq.atlassian.net/browse/NDAT-257).

This runs the Python tests in parallel, all at once, with each test class spinning up HGE and configuring it appropriately. Once we are confident this works, we can remove most of the old jobs, drastically reducing the number of machines we need to run the Python tests.

For now we are only running on PostgreSQL 15. Once this is merged, we can expand to all supported PostgreSQL versions, and then Citus, MS SQL Server, and BigQuery.

[NDAT-257]: https://hasurahq.atlassian.net/browse/NDAT-257?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7780
GitOrigin-RevId: 174511fc3e3bcd4ea968e3ade6c867c3aa84096a
2023-02-03 14:09:29 +00:00
Auke Booij
e6db044ecc server: fix some hspec tests
- One test suite wasn't getting picked up due to it not satisfying the [criteria](https://hspec.github.io/hspec-discover.html) for `hspec-discover`
- One test was broken ever since it was introduced in hasura/graphql-engine-mono#5181. This wasn't picked up due to the module not satisfying `hspec-discover`'s criteria until more recently.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7801
GitOrigin-RevId: fd5c31ccf12d6d0c4be0dc7bf99f14d63caccc83
2023-02-03 14:09:19 +00:00
paritosh-08
775bdc8026 server: move event trigger schedule cleanup logic
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7606
Co-authored-by: Krushan Bauva <31391329+krushanbauva@users.noreply.github.com>
GitOrigin-RevId: 95819347aff4e6a86b2bc9acf214222e05dba496
2023-02-03 12:30:00 +00:00
Daniel Harvey
d32e734310 [server] Pass parameters to native queries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7727
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: ddca3d962c05024913ce6ec4c6b4ea4a0f4a6a8c
2023-02-03 11:16:29 +00:00
Samir Talwar
416f4e8f1e server/api-tests: Port a test for empty roots from the Python tests.
More for practice than anything else.

[NDAT-459]: https://hasurahq.atlassian.net/browse/NDAT-459?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7760
GitOrigin-RevId: 3af769e704b25e5cc97ab5905b6f5311f731bbce
2023-02-03 10:00:21 +00:00
Solomon
621a346ca7 Simplify SourceKindInfo ToJSON instance
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7787
GitOrigin-RevId: f481c7b3dadbbd9b97655187a486954e0e17ae4f
2023-02-03 01:47:02 +00:00
Antoine Leblanc
e99f9a2f57 Remove MetadataStorageT, clean up error handling.
## Description

This PR removes `MetadataStorageT`, and cleans up all top-level error handling. In short: this PR changes `MonadMetadataStorage` to explicitly return a bunch of `Either QErr a`, instead of relying on the stack providing a `MonadError QErr`. Since we implement that class on the base monad *below any ExceptT*, this removes a lot of very complicated instances that make assumptions about the shape of the stack.

On the back of this, we can remove several layers of ExceptT from the core of the code, including the one in `RunT`, which allows us to remove several instances of `liftEitherM . runExceptT`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7689
GitOrigin-RevId: 97d600154d690f58c0b93fb4cc2d30fd383fd8b8
2023-02-03 01:05:09 +00:00
Solomon
29a75e36f9 Reorganize Hasura.Prelude module and add haddocks.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7790
GitOrigin-RevId: 9ad68061d58c7d8763fefeba3f3fe9ddd29d443c
2023-02-02 23:38:01 +00:00
Julian@Hasura
40c25057ba Feature: Delete rows hook
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7546
Co-authored-by: Julian <843342+okjulian@users.noreply.github.com>
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
Co-authored-by: Luca Restagno <59067245+lucarestagno@users.noreply.github.com>
Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com>
Co-authored-by: Nicolas Beaussart <7281023+beaussan@users.noreply.github.com>
GitOrigin-RevId: 9efcea1d9babe9977bb578c73e638a981630aaf7
2023-02-02 20:52:09 +00:00
Sean Park-Ross
8f4ba6c564 Docs: Add snowflake and athena to databases list. DigitalOcean one word
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7767
GitOrigin-RevId: 323ef11e437a569d57f5c488e8db5374c1e22604
2023-02-02 20:04:11 +00:00
Rob Dominguez
05042d33d5 docs: optimize code elements inside tables
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7776
GitOrigin-RevId: eea30d61c6ba04cb1c6b49d6cfaa4c561b21226b
2023-02-02 20:00:42 +00:00
Auke Booij
aeff6e162a server: fix cabal and warnings for arrows related packages
#7730 added `package` stanzas for all our internal Haskell libraries, so that `-Werror` was switched on for all of them. However, #7534 was developed simultaneously, and merged shortly after, so that we missed `package` stanzas for `hasura-incremental` and `arrows-extra`. Then #7761 added one for `hasura-incremental`. This PR fixes one warning for a test suite there, and adds the missing `package` stanza for `arrows-extra`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7770
GitOrigin-RevId: 5f5c3fb5d4852c88ed2e14a3fa83fe264aec895b
2023-02-02 19:53:13 +00:00
Daniel Harvey
e953efeb40 [ci] test the libraries in server/lib
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7758
Co-authored-by: Tom Harding <6302310+i-am-tom@users.noreply.github.com>
GitOrigin-RevId: 311f6c4a5c629c18a55d75a5d5a74f826078e86d
2023-02-02 17:32:48 +00:00
Nicolas Inchauspe
737071a760 console: fix notifications alignment and spacing
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7769
GitOrigin-RevId: cfa6fb1cf26e5b0287ccc87a02997dc5a78a1719
2023-02-02 16:50:07 +00:00
Tom Harding
64f79daa3f Allow pg_run_sql as well as run_sql to remove some string-bodging
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7465
GitOrigin-RevId: 754866121fbd631273ae00a2305c8ddbba286596
2023-02-02 14:04:52 +00:00
Lyndon Maydwell
9a54849985 Fixing issues with SQLite FKs in Schema and Suggest Relationships API Docs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7729
GitOrigin-RevId: 4ae48019ce71f6ceb3f6d06524302bdd11ca1ed4
2023-02-02 11:37:32 +00:00
Philip Lykke Carlsen
69ae616ae5 Bump autodocodec to 0.2.0.3, ditch Data.Voidable
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7753
GitOrigin-RevId: c5dce6cf125b6bc53fd5ac7b689d1ed71fd6257b
2023-02-02 10:54:59 +00:00
Nicolas Beaussart
0947e7390c ci: setup chromatic to run on new workspace
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7740
GitOrigin-RevId: 56764d7009268592e6580c13d70237af10a826eb
2023-02-02 10:04:09 +00:00
Samir Talwar
5dbca897c6 api-tests: If a GET request fails with the wrong status code, print the response.
It's pretty frustrating to see an error in CI and not know the actual cause, because we just dropped the information.

This adds the actual status code and body to the error message.

Previously, `getWithStatus` was only used by the `healthCheck'` function. This also refactors `get_` to use the same function, so we don't have to duplicate the error-handling logic.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7752
GitOrigin-RevId: 474e4c02ad6c5b676abc311b90b21998b4a93d94
2023-02-02 09:18:27 +00:00
Daniel Chambers
67bc017cf3 Gardening: Enable and fix warnings in dc-api package
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7765
GitOrigin-RevId: 7dd6b1c065cc68ab413736ca49e5957a7697566b
2023-02-02 05:48:25 +00:00
Daniel Chambers
b012f2ebc7 Use Dataset Clones for all SQLite tests
[GDC-718]: https://hasurahq.atlassian.net/browse/GDC-718?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7743
GitOrigin-RevId: 6c3577c1d4ffd2212a72b6e1a24e0e384f2db046
2023-02-02 04:27:57 +00:00
Antoine Leblanc
1fe7fe43b8 Fix all warnings in internal libraries and enable -WError everywhere
### Description

This PR:
- fixes the package names in dev-sh.project.local (the config was using the names of the folders, not the names of the packages)
- adds similar options to CI: we also want to build with CI and in parallel there
- fixes all warnings

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7761
GitOrigin-RevId: ef1d78db8c94f5e74c18443aa517544f6a6f5a10
2023-02-01 23:32:19 +00:00
Antoine Leblanc
30e772d3fa add content-length header.
## Description

Adds a content-length response header to all endpoints. This PR tests this feature by checking the content-length of every request we send in the tests.

## Changelog ✍️

__Component__ : server

__Type__: enhancement

__Product__: community-edition

### Short Changelog

add a content-length response header to all endpoints

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7444
Co-authored-by: Manas Agarwal <5352361+manasag@users.noreply.github.com>
GitOrigin-RevId: a0a811852053c5dde4b11b71ba11a7d456c84d76
2023-02-01 21:32:50 +00:00
Tom Harding
a425c97e1e Remove redundant Backend constraints
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7757
GitOrigin-RevId: b5bc017b0ee3a9daeca78437278525be17a33f4f
2023-02-01 19:48:21 +00:00
Tom Harding
e41654b133 Reject MonadUnique, embrace IO
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7751
GitOrigin-RevId: 3edc4dee10d58afac911c9862e3b55a4c458a293
2023-02-01 18:57:46 +00:00
Vijay Prasanna
c663cb9879 feature (console): streamlined UI for DB-to-X relationships
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7678
Co-authored-by: Nicolas Beaussart <7281023+beaussan@users.noreply.github.com>
GitOrigin-RevId: 2bc3e26efa6037341157e01c27aca8e532353f36
2023-02-01 18:15:57 +00:00
Samir Talwar
ac985c2235 server/api-tests: Move tests that test errors into their own directory.
Named "Test.Queries.Errors".

This also sorts the test list in _api-tests.cabal_.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7755
GitOrigin-RevId: 3b015a50e6de54c6573444b460b7977897f59738
2023-02-01 16:19:52 +00:00
Daniel Harvey
52317930fe Fix make ghcid-api-tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7738
GitOrigin-RevId: 1576bfb51b20cdc8a67924533e4da03ec2f1f3af
2023-02-01 12:34:59 +00:00
hasura-bot
753c94e31e community: add nextjs-13 sample app
GITHUB_PR_NUMBER: 9213
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/9213

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6890
Co-authored-by: arjunyel <11153289+arjunyel@users.noreply.github.com>
GitOrigin-RevId: 38f41f010759b06ae3c0c3031a56659c8d040c77
2023-02-01 12:32:07 +00:00
hasura-bot
95444b60da update the nextjs postgres graphql sample app
GITHUB_PR_NUMBER: 9048
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/9048

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6159
Co-authored-by: Amit Kumar Sharma <91947037+amit-ksh@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: 0565d8a00c944d72b46bc5ce0ff40fc3e8bfca51
2023-02-01 12:28:44 +00:00
Tom Harding
18b346bf44 Extract Hasura.Incremental into lib/hasura-incremental
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7534
GitOrigin-RevId: 85863cee836d348e8e314f8af1b50bb5cd912b46
2023-02-01 12:25:33 +00:00
Vijay Prasanna
80a3c63f32 fix (console): edit connection UI bug with default values
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7744
GitOrigin-RevId: 3337c7e7a1930d829949d0ecc7bfb8b63ac44682
2023-02-01 11:26:12 +00:00
Daniel Harvey
4418d294f9 [server] parse native query in metadata call
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7731
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 96d60c72da05970f5b34f310f9fe71d9f67387a1
2023-02-01 08:46:19 +00:00
Shraddha Agrawal
4fade177c7 docs: update cloud regions available in AWS and GCP
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7742
GitOrigin-RevId: 18f36227f5929fd2e12acac9d8ab21e354871ad4
2023-02-01 08:08:48 +00:00
Rob Dominguez
f61e1f988f docs: update pricing and badges
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7719
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: 60a8358fdfa08670f636c0a760eb13da7ecf0546
2023-01-31 23:13:20 +00:00
Varun Dey
2508b35c90 console: Pass hasura project name as args for neon create DB mutation
[GT-381]: https://hasurahq.atlassian.net/browse/GT-381?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7409
Co-authored-by: Mohd Bilal <24944223+m-Bilal@users.noreply.github.com>
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
Co-authored-by: Nicolas Inchauspe <710410+nicoinch@users.noreply.github.com>
Co-authored-by: Stefano Magni <173663+NoriSte@users.noreply.github.com>
Co-authored-by: Divi <32202683+imperfect-fourth@users.noreply.github.com>
Co-authored-by: paritosh-08 <85472423+paritosh-08@users.noreply.github.com>
Co-authored-by: ananya-2410 <107847554+ananya-2410@users.noreply.github.com>
Co-authored-by: Varun Choudhary <68095256+Varun-Choudhary@users.noreply.github.com>
Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com>
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
Co-authored-by: Puru Gupta <32328846+purugupta99@users.noreply.github.com>
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
Co-authored-by: Abhijeet Khangarot <26903230+abhi40308@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: f900d38a71a4306b208bc0cf406c109c3b7c028d
2023-01-31 20:31:22 +00:00
Nicolas Inchauspe
a7af427d38 console: fix remove useless warning
[PLAT-411]: https://hasurahq.atlassian.net/browse/PLAT-411?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7737
GitOrigin-RevId: 2753d7cdb09e9651361de702f8b1bca210cf803d
2023-01-31 19:45:30 +00:00
Auke Booij
a5325d6aea server: fix cabal files; apply ghc warnings more strictly
- In a previous PR we made more use of `common` stanzas, but these require `cabal-version: 2.2` (so some of those stanzas were not functional before this PR). This just bumps the `cabal-version`s straight to 3.6, which is the latest version we support in CI, where we build with cabal 3.6.
- This `cabal-version` upgrade required fixing a few `license` fields, from `BSD3` to `BSD-3-Clause`. I've also added `default-language` fields where appropriate, although this is perhaps optional.
- Using cabal's [syntax for applying options to all _local_ packages](https://cabal.readthedocs.io/en/3.8/cabal-project.html#package-configuration-options), we unify the cabal configuration, and apply `-Werror` to all local packages, which wasn't the case until now.
- Applying `-Werror` to all local packages required a few additional exceptions to the warnings that were switched on in hasura/graphql-engine-mono#7614.
- Deleted SCM links to the original pool library.

Overall, the effect of this PR is:
- more warnings
- stricter compilation
- ~~less cabal configuration~~

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7730
GitOrigin-RevId: 592e9e46d103bcc8726df5b745306bd9f77f7efc
2023-01-31 18:25:42 +00:00
Karthikeyan Chinnakonda
0406cd2ef0 server: refactor the clear_metadata and the replace_metadata API handler
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7631
GitOrigin-RevId: 69a05f175f7fda1ed6a2dfb311b3f331b209a5aa
2023-01-31 17:41:09 +00:00
Samir Talwar
87be5db9df make: Don't stop test database containers after running tests.
The tests no longer need a fresh, clean database, so we don't need to spend the time spinning them up and shutting them down again.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7732
GitOrigin-RevId: f2b412f4a8c762ee6699bd1bec1eef89f7682712
2023-01-31 17:00:11 +00:00