Commit Graph

4680 Commits

Author SHA1 Message Date
Naveen Naidu
d33025ff5b server: fix indexes for MSSQL event triggers
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4766
GitOrigin-RevId: 1c1bf173e53fd0b6692131632023817dc843b302
2022-07-01 06:51:41 +00:00
paritosh-08
0c6ddc3666 server: fix typename for custom table name with graphql-default naming convention
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4843
GitOrigin-RevId: 3d61b9d6a893b2a69a6f16bc409242d5ecc3bc8a
2022-07-01 06:12:02 +00:00
Sooraj
c50e40834a Update OSS issue template
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2734
GitOrigin-RevId: cb507686b82fe400a13aaed89d45ceb213e7a3d2
2022-07-01 03:57:24 +00:00
Solomon
0f6c4a890b Monomorphize Some Hge Options
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4925
GitOrigin-RevId: e4d39c2c495a0979f7e90d54e0df9a40260f5a18
2022-07-01 03:40:46 +00:00
surendran82
d89e4801fa docs: hasura con post conference banner updates
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4922
GitOrigin-RevId: 8c974999923ab556033566215fa13b68ff7df36d
2022-06-30 18:26:57 +00:00
Philip Lykke Carlsen
824697a1e8 Break up class BackendSchema in two
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4901
GitOrigin-RevId: fdef33b69626d1694dc1938bb76e001284dd1b50
2022-06-30 15:23:35 +00:00
Nicolas Inchauspe
c8aa0f3e42 console: migrate REST endpoint form to new components
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4701
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: eb1948254eeface1da2eb58257a74e06e1263c7e
2022-06-30 14:17:52 +00:00
Luca Restagno
ea89170c06 console: fix pro-cli user access issue on security tab and read replica configuration
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4744
GitOrigin-RevId: e40903fe4942f042f4778ba0fffab68af89b032c
2022-06-30 13:39:55 +00:00
Antoine Leblanc
3a400fab3d Rewrite OpenAPI
### Description

This PR rewrites OpenAPI to be more idiomatic. Some noteworthy changes:
- we accumulate all required information during the Analyze phase, to avoid having to do a single lookup in the schema cache during the OpenAPI generation phase (we now only need the schema cache as input to run the analysis)
- we no longer build intermediary endpoint information and aggregate it, we directly build the the `PathItem` for each endpoint; additionally, that means we no longer have to assume that different methods have the same metadata
- we no longer have to first declare types, then craft references: we do everything in one step
- we now properly deal with nullability by treating "typeName" and "typeName!" as different
- we add a bunch of additional fields in the generated "schema", such as title
- we do now support enum values in both input and output positions
- checking whether the request body is required is now performed on the fly rather than by introspecting the generated schema
- the methods in the file are sorted by topic

### Controversial point

However, this PR creates some additional complexity, that we might not want to keep. The main complexity is _knot-tying_: to avoid lookups when generating the OpenAPI, it builds an actual graph of input types, which means that we need something similar to (but simpler than) `MonadSchema`, to avoid infinite recursions when analyzing the input types of a query. To do this, this PR introduces `CircularT`, a lesser `SchemaT` that aims at avoiding ever having to reinvent this particular wheel ever again.

### Remaining work

- [x] fix existing tests (they are all failing due to some of the schema changes)
- [ ] add tests to cover the new features:
  - [x] tests for `CircularT`
  - [ ] tests for enums in output schemas
- [x] extract / document `CircularT` if we wish to keep it
- [x] add more comments to `OpenAPI`
- [x] have a second look at `buildVariableSchema`
- [x] fix all missing diagnostics in `Analyze`
- [x] add a Changelog entry?

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4654
Co-authored-by: David Overton <7734777+dmoverton@users.noreply.github.com>
GitOrigin-RevId: f4a9191f22dfcc1dccefd6a52f5c586b6ad17172
2022-06-30 12:57:09 +00:00
Naveen Naidu
f7178e75f9 server: fix unlockEventsInSource bug
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4821
GitOrigin-RevId: be417c1f05600e3b57fa1e448f69ebd8536c8ff7
2022-06-30 11:27:16 +00:00
Vishnu Bharathi
b4f9626b00 ci: tag release v2.8.3
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4915
Co-authored-by: Divi <32202683+imperfect-fourth@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: e7f5372829b8bb4d84f30b20c4cd488f516389d1
2022-06-30 10:57:25 +00:00
Tom Harding
ffad733bd3 Port the "test_user_perms" pytest to hspec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4828
GitOrigin-RevId: 6227b8601e6b4d6f6bf2bd199cdb4d94a200c96c
2022-06-30 10:28:08 +00:00
Tom Harding
c90b8c4776 Add forkIO and threadDelay errors to HLint.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4682
GitOrigin-RevId: 35897df6793b41dbf54521a868c2d2daf7e268ea
2022-06-30 09:56:06 +00:00
Daniel Chambers
3f405915e9 Added a healthcheck endpoint to the Data Connector Agent API spec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4890
GitOrigin-RevId: 605408bddf03bef66eb03be8c242797e8fcf89bb
2022-06-30 08:37:53 +00:00
Luca Restagno
27398f40f4 console: fix cloud console header active tab highlighting
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4799
Co-authored-by: Nicolas Beaussart <7281023+beaussan@users.noreply.github.com>
GitOrigin-RevId: bc5b1c99f555ec39a43fbad5407461e8419003fa
2022-06-30 08:07:15 +00:00
Naveen Naidu
25bd8b6e0f server: fix mssql_redeliver_event API
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4885
GitOrigin-RevId: c422f10a06301cf33467e404438bee4b52b4d86d
2022-06-30 06:45:35 +00:00
paritosh-08
3d001fedb8 server: respect experimental flag for naming convention of table column names
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4845
GitOrigin-RevId: f1347ec64ff883d1dcc87e588a063557d37cb968
2022-06-30 05:57:18 +00:00
Stefano Magni
07875ace0f console: Fix the Action with Transform E2E test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4883
GitOrigin-RevId: 37344cd834cf53b127b3f69a0952f81486aca9b1
2022-06-29 17:22:05 +00:00
Sean Park-Ross
c20f069cb7 Docs: Preview apps: fix screenshot, table of contents, markdown table
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4902
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: 67633ecf37dbd077dd668d34fff2fa977a680445
2022-06-29 16:15:01 +00:00
Philip Lykke Carlsen
a409e79167 Move postgres specific schema into the Postgres namespace
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4895
GitOrigin-RevId: 62772d966bf2b4a4dcb26c1dd0bd4f30749b7c91
2022-06-29 16:05:35 +00:00
Vishnu Bharathi
331ae6ab56 ci: tag release v2.8.2 and v2.8.2-pro.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4899
GitOrigin-RevId: 5e1aa15b8fc1c744d7f9362596ac0d31d5235a2a
2022-06-29 13:54:48 +00:00
Abby Sassel
9d93baa96f server/postgres: parameterise array variables in queries/subscriptions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4776
Co-authored-by: Tom Harding <6302310+i-am-tom@users.noreply.github.com>
Co-authored-by: Brandon Martin <40686+codedmart@users.noreply.github.com>
GitOrigin-RevId: ca962e3bfaa28ef00c5d04273d6604348d7da1c8
2022-06-29 13:37:11 +00:00
Sandeep Raj Kumar
a3539baf7d docs: Rename Metrics to Observability
Rename the Sub-heading `Metrics` in the cloud docs to `Observability`.
Note: The links still contain `metrics`. I will follow up with another PR to change the links and add redirects for the old links so that the doc references in Cloud console do not break.
Slack Thread [here](https://hasurahq.slack.com/archives/C01MD2B8A0K/p1656415791128499)

>

## Description ✍️
->

### Related Issues ✍
->

### Solution and Design ✍
>

### Steps to test and verify ✍
>

### Limitations, known bugs & workarounds ✍
>

## Affected components ✍️

- Docs

### Breaking changes ✍

- No Breaking changes

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4888
GitOrigin-RevId: 603f443d7f7a909d4fd87f0354ed3147063a5523
2022-06-29 12:25:38 +00:00
Brandon Martin
5e29a1304d Revert "Add _cast support for other postgres datatypes fix #6050 and …
…fix #5426"

This reverts commit f85742318167d1e51f463c45fcd00f26269c2555.

## Description ✍️
With this commit there is the possiblity that you could get conflicting
type definitions with remote schemas. Reverting for now as we determine
a solution. At which point we will add this back in.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4879
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 932b4a9226717c826d4bde7e375695354cee8c0c
2022-06-29 12:09:40 +00:00
Abhijeet Khangarot
2fc1bafb40 console: fix supported features tracking flag not disabling tracking
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4872
GitOrigin-RevId: 94d81621861dca944dc7d6702775a74ff6edcf3a
2022-06-29 08:57:18 +00:00
Samir Talwar
5f38743f29 server: Encapsulate catalog versions in their own type.
This came about as I tried to add an instance over catalog versions and
found they were just simple integers most of the time (and in one case,
a float).

I think this change also clarifies how catalog versions work.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4864
GitOrigin-RevId: a6b7db86de564b71a8c2b602bee6a456b8e20d63
2022-06-29 08:19:33 +00:00
Daniel Chambers
59ffce9ac1 Generate TypeScript types for the Data Connector reference agent from the OpenAPI schema
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4855
GitOrigin-RevId: 4cc09d6706e67c69fbbedef72ff816365b9f7b4e
2022-06-29 07:43:52 +00:00
Karthikeyan Chinnakonda
4b2ca2ea63 server: Recreate event trigger tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4808
GitOrigin-RevId: c4eac26ec24036a6c6fb4fbdb1fdc57663eba21d
2022-06-29 06:46:18 +00:00
Daniel Chambers
f18e571455 Data Connectors: Fixed multiple relationships on the same table not generating correct query
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4880
GitOrigin-RevId: 537361cafca7ce4fc2a74b43740092bf09fcab6d
2022-06-29 01:08:11 +00:00
Daniel Chambers
e3d8221f0c Add CORS support to the reference agent
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4844
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: e5605786732322768c235957c31f29ab6129c658
2022-06-29 00:01:03 +00:00
Priya Sharma
5348163d6d docs : update vercel official hasura integration link
>

## Description ✍️
->

PR updates the link for official Hasura integration.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4884
GitOrigin-RevId: 106d9848b267bb4b36287e56a06537acdaa5d8f9
2022-06-28 16:28:16 +00:00
Rob Dominguez
c529e659bf docs: update db avail matrix
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4878
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 8ed1a02691d50fc79bd801f19e9af130b292cb4b
2022-06-28 16:17:12 +00:00
Auke Booij
8ccf7724ce server: Metadata origin for definitions (type parameter version v2)
The code that builds the GraphQL schema, and `buildGQLContext` in particular, is partial: not every value of `(ServerConfigCtx, GraphQLQueryType, SourceCache, HashMap RemoteSchemaName (RemoteSchemaCtx, MetadataObject), ActionCache, AnnotatedCustomTypes)` results in a valid GraphQL schema. When it fails, we want to be able to return better error messages than we currently do.

The key thing that is missing is a way to trace back GraphQL type information to their origin from the Hasura metadata. Currently, we have a number of correctness checks of our GraphQL schema. But these correctness checks only have access to pure GraphQL type information, and hence can only report errors in terms of that. Possibly the worst is the "conflicting definitions" error, which, in practice, can only be debugged by Hasura engineers. This is terrible DX for customers.

This PR allows us to print better error messages, by adding a field to the `Definition` type that traces the GraphQL type to its origin in the metadata. So the idea is simple: just add `MetadataObjId`, or `Maybe` that, or some other sum type of that, to `Definition`.

However, we want to avoid having to import a `Hasura.RQL` module from `Hasura.GraphQL.Parser`. So we instead define this additional field of `Definition` through a new type parameter, which is threaded through in `Hasura.GraphQL.Parser`. We then define type synonyms in `Hasura.GraphQL.Schema.Parser` that fill in this type parameter, so that it is not visible for the majority of the codebase.

The idea of associating metadata information to `Definition`s really comes to fruition when combined with hasura/graphql-engine-mono#4517. Their combination would allow us to use the API of fatal errors (just like the current `MonadError QErr`) to report _inconsistencies_ in the metadata. Such inconsistencies are then _automatically_ ignored. So no ad-hoc decisions need to be made on how to cut out inconsistent metadata from the GraphQL schema. This will allow us to report much better errors, as well as improve the likelihood of a successful HGE startup.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4770
Co-authored-by: Samir Talwar <47582+SamirTalwar@users.noreply.github.com>
GitOrigin-RevId: 728402b0cae83ae8e83463a826ceeb609001acae
2022-06-28 15:53:44 +00:00
Priya Sharma
9f179a7746 docs : remove under preview section from github docs
>

## Description ✍️
->

This PR removes the `under preview` section from github docs.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4881
GitOrigin-RevId: a938e411a11372263a4366a66c4ec8202f0264aa
2022-06-28 15:06:42 +00:00
hasura-bot
bfe4c48245 community: add streaming-subscription-chat example
GITHUB_PR_NUMBER: 8588
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/8588

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4731
Co-authored-by: arjunyel <11153289+arjunyel@users.noreply.github.com>
GitOrigin-RevId: 0db7eabcc8a05a2c98f50cd767c38757d534d648
2022-06-28 14:26:08 +00:00
Abhijeet Khangarot
4d21f4d86b console: update connect database form to show helper text for SSL certificates fields
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4870
GitOrigin-RevId: c7117855d3acc5f8e097b2331228d163473bee82
2022-06-28 13:12:09 +00:00
Rishichandra Wawhal
e617dccec5 console: ux fixes for sample database experiment
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4875
GitOrigin-RevId: c1aedc5fae78b74165d612534392808b86becb9a
2022-06-28 11:45:04 +00:00
Sean Park-Ross
405b953c88 Docs: move preview apps page from "deployment" section to cloud root
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4876
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: d614cd0d48162d4206ac5accdbc72b755cb63390
2022-06-28 11:11:22 +00:00
Daniel Harvey
e4da80421e server: Change withPath to take a single pathItem in MonadParse
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4815
GitOrigin-RevId: d0d889754944cc8270bdee2fd21b0cf5dcad9175
2022-06-28 10:08:09 +00:00
Vijay Prasanna
3d2ad8fdbb feat (console): add connect db UI that works via the data abstraction layer
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4763
GitOrigin-RevId: 6fae278b86d7cc56d4f7980ddeb5bea7afd55f1a
2022-06-28 09:33:58 +00:00
Samir Talwar
c2d0d272ee server: Create the BigQuery test tables and data in one go.
This has a couple of advantages:

1.  One query is probably faster than many.
2.  Creating a table with data is valid on the BigQuery sandbox (free tier); `INSERT INTO` is not.
3.  We eat fewer resources by not running any DML, and so should hit usage caps less often.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4867
GitOrigin-RevId: 70537d5b306e5231beb8ae197a95bd8ea995e1e9
2022-06-28 08:40:33 +00:00
Stefano Magni
fb1dc2e0ba console: improve actions E2E tests with rest connectors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4520
GitOrigin-RevId: 24d9176dc5f93747e4b3a12ed08171064e75900e
2022-06-28 05:40:36 +00:00
Lyndon Maydwell
ab8369bdcf PG SSL-cert maybe fields
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4767
GitOrigin-RevId: 042fa622c6f208cf72fee40acee28e87ebcf1f67
2022-06-28 01:26:03 +00:00
Jesse Hallett
2f3ae93ab0 server: initial set of DTO types for metadata
This implements an initial set of DTO types that represent serialized metadata. These new types come with codecs using autodocodec which are used to derive both JSON serialization, and OpenAPI documentation. This ensures that we can automatically generate API documentation that is guaranteed to match JSON produced by the server.

For the moment the new types are not used for anything except to generate an early version of an OpenAPI document. Because this is early work the DTO types for each metadata format version list top-level properties only with placeholders for the types of each top-level property. This early iteration demonstrates using a sum type in Haskell that maps to a tagged union in OpenAPI (using the `version` field value as a tag).

This work is experimental and incomplete! Please do not incorporate the generated OpenAPI documentation into essential workflows at this time.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4801
GitOrigin-RevId: d2f110a6237b73520cdba24667333ef14e8cdd3d
2022-06-27 16:33:31 +00:00
Gil Mizrahi
38b1c0d774 server/tests/bigquery: Expose internal error information + handle teardown robustly + retry on jobRateLimitExceeded error
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4810
Co-authored-by: Samir Talwar <47582+SamirTalwar@users.noreply.github.com>
GitOrigin-RevId: e8696491475a668976a0e86322b7a8772ed9f946
2022-06-27 14:33:42 +00:00
Rishichandra Wawhal
d70ba47f5f console: on clicking "Use Sample DB", toast helper text for the subsequent action
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4856
GitOrigin-RevId: 19ff9f46f1ba255980ff5e54e1a0669c5b111ba9
2022-06-27 12:22:15 +00:00
Rakesh Emmadi
7634be3216 server: fix dropping column from a table that has update permissions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4840
GitOrigin-RevId: cea142fe225315f4f4094f157d8a95df14273306
2022-06-27 10:02:23 +00:00
Lyndon Maydwell
3c33996e7d Data-Connectors SDK
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4332
GitOrigin-RevId: aa93b65e266d73c3b7b80fafd4e36da74428add4
2022-06-27 09:32:12 +00:00
hasura-bot
f4891d71c3 docs: add white space on auth webhook page
GITHUB_PR_NUMBER: 8628
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/8628

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4853
Co-authored-by: J. G. Sebring <4135198+Sebring@users.noreply.github.com>
GitOrigin-RevId: d3f8194cc52a28dac15296a0e0742ed8eb05a837
2022-06-27 08:49:59 +00:00
hasura-bot
92f601587c cli: use 2-spaces indent for graphql query in metadata (fix #8469)
GITHUB_PR_NUMBER: 8519
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/8519

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4544
Co-authored-by: Yudai Shinnoki <2777896+shinnoki@users.noreply.github.com>
Co-authored-by: Divi <32202683+imperfect-fourth@users.noreply.github.com>
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 3d9f9d1bf940e528a1ad9fab67b6ae818927ffac
2022-06-27 05:27:19 +00:00