Commit Graph

4502 Commits

Author SHA1 Message Date
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
awjchen
1db8ca4700 server: build event triggers earlier in the schema cache
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4597
GitOrigin-RevId: 2eb1d16fe1790fd4092c608d62beefb467e546f4
2022-06-27 00:37:57 +00:00
Brandon Simmons
b704192268 server: GHC 9.2 changes compatible with 8.10 (#3550)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4841
Co-authored-by: awjchen <13142944+awjchen@users.noreply.github.com>
GitOrigin-RevId: ce47b1290fefb07f3f800c6c62120437c02086e5
2022-06-25 22:09:05 +00:00
Solomon
baf196daa6 [GDW-111] Mockable GDC Agent for integration testing
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4802
GitOrigin-RevId: 36cdfcff4a864598a4d10e746ecdf93dae2b4c02
2022-06-25 19:06:54 +00:00
Samir Talwar
75c01223a8 server: Use plain assertions in pytest.
When pytest rewrites assertions to make them more useful, it also
truncates long assertion messages in the middle, often obscuring the
actual error.

Disabling this allows us to see the full message, which should hopefully
allow us to see the actual error.

In order to support this, we need to make sure that custom assertion
messages include the actual assertion information, as this will no
longer be rendered by pytest.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4835
GitOrigin-RevId: de6839a3b40d0edc7cb96e46625eebca0aaf0c95
2022-06-25 00:04:16 +00:00
Stefano Magni
5cfec727ec console: Remove the Pro Console E2E tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4511
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: 916efec269f067ca628df739e0e7cb6cd26d20f2
2022-06-24 16:02:09 +00:00
Vishnu Bharathi
66105d6741 ci: build and publish multitenant docker image in cloud release pipeline
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4709
GitOrigin-RevId: 78c3a41fab37c20c674b55d8f5bd8a0a1f478115
2022-06-24 15:34:04 +00:00
Rishichandra Wawhal
b42bfe2c10 console, pro-console: allow trying sample read-only database in cloud console
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4833
GitOrigin-RevId: edc0550336b1edc9cf8706753e3ac6b336fa6a2c
2022-06-24 14:34:03 +00:00
Stefano Magni
717cf4fa86 console: Refactor the Action With Transform E2E tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4519
GitOrigin-RevId: 1bcef6b5525e3bf361000ca1905e04cebe18542a
2022-06-24 13:38:34 +00:00
Sean Park-Ross
3f5a55ef18 Docs: fix broken link in cloud index
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4847
GitOrigin-RevId: 4e704e628e4fde039d59866d145601bdc7fe9cb9
2022-06-24 11:47:29 +00:00
surendran82
b9db8afbee docs: hasura con banner updated and thin banner stripe bg color updated
>

## Description ✍️
Hasura con banner updated and announcement banner background color change

->

- Docs

---

### Kodiak commit message
Information used by [Kodiak bot](https://kodiakhq.com/) while merging this PR.

#### Commit title
Same as the title of this pull request

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4846
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: 78d922cd34204bf271359875d27eec1f0f789e8b
2022-06-24 10:19:36 +00:00
Shraddha Agrawal
6c5cd40763 docs: rehaul preview app docs & improve cloud api reference
>

## Description ✍️
->
This PR rehauls Hasura Cloud Preview App docs.

The changed components:

- removes the preview-app single page doc.
- adds a top level directory called `deployment`:
- within this, 3 pages are added:
  - index for preview apps
  - preview apps github action docs
  - preview apps API docs
- updates the API reference doc for preview api mutation/query with detailed information

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4779
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
Co-authored-by: Marion Schleifer <5722022+marionschleifer@users.noreply.github.com>
GitOrigin-RevId: f8dd0c713c3a76e7a95c598a78ea5cc8c2e7df8d
2022-06-24 08:53:30 +00:00
Daniel Chambers
7ec5e79bd1 AVRelationship Support for Data Connectors [GDW-123]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4735
GitOrigin-RevId: f23965a6c7ea8a0e6b25dbf9d3faeccec0ef6ec3
2022-06-24 06:59:52 +00:00
Rob Dominguez
639555b349 docs: updated auth diagrams to read database vs pg
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4775
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: 6bd01bce992fca4eacc779fdb883ae7ed47ff08e
2022-06-23 15:44:05 +00:00
nevermore
a2ef9ebfff docs: Public GraphiQL docs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4643
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
Co-authored-by: Marion Schleifer <5722022+marionschleifer@users.noreply.github.com>
GitOrigin-RevId: c390b30e14cc0212bdbe3a9280f4276310b7c568
2022-06-23 15:41:39 +00:00
Stefano Magni
899ea09d8b console: Refactor the Query Action E2E tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4513
GitOrigin-RevId: 72ef55a79cfca193d81c8998324f94b37e575438
2022-06-23 14:58:59 +00:00
Priya Sharma
59af87b28b docs : add debug steps for version check error in github integration
>

## Description ✍️

This PR updates the github integration docs to add steps for debugging the error `version check` under common errors.
->

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4816
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: c306e8eeb174402477ce43cc50774a5583077911
2022-06-23 13:40:00 +00:00
Karthikeyan Chinnakonda
db5d0b1d93 User facing docs for disabling root fields
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4616
Co-authored-by: Auke Booij <164426+abooij@users.noreply.github.com>
Co-authored-by: Marion Schleifer <5722022+marionschleifer@users.noreply.github.com>
GitOrigin-RevId: e4fc23245c6d4e53b8e355a858b2ab335348beba
2022-06-23 13:16:54 +00:00
Antoine Leblanc
664633fc4b Remove the source cache from the schema context
### Description

This PR removes the source cache from the schema context. :)

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4830
GitOrigin-RevId: af312a22b70d042c5faf8d67c0cee254537be836
2022-06-23 11:43:17 +00:00
Antoine Leblanc
661a1b6560 Remove source cache requirement in action schema
### Description

This PR removes the need for the `SourceCache` when building the schema for the actions. To do so, it changes the way we represent custom types in the source cache. Instead of trying to reuse the same `ObjectTypeDefinition` and `TypeRelationship`. we now have separate `AnnotatedObjectType` and `AnnotatedRelationship`. When building them, at schema cache building time, we persist all the relevant source information, so that it's all available at schema building time.

This PR makes no attempt at re-using `RemoteRelationship` primitives, to avoid having to change the way async action queries are executed, and to avoid having to make complicated changes to how we parse and represent those relationships.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4813
GitOrigin-RevId: 3cc65c5a043c8d3da5f7214eed40c558c4349327
2022-06-23 10:52:32 +00:00
Sean Park-Ross
7a552d34da docs: wiki style section
**WIP**

## Description ✍️
Adding a style section to the documentation wiki.

This is a distillation and continuation of the notes started by @marionschleifer and @rikinsk at https://docs.google.com/document/d/1lD7IVEjtv5Sf9BaVqzefLywG-kNpuM40I84ThIUSmwg/edit

* _Everything is very much in a WIP stage._

* Everything is on one page for now, but if it warrants it, each sections could be broken out into separate parts under a main `style` section.

@robertjdominguez Please let me know your thoughts too.

**Anyone** please feel free to edit and push to this branch.

- Sean

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4642
Co-authored-by: parklifeio <33491775+parklifeio@users.noreply.github.com>
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: 48a26500114efcef22278d4e673ce0289bd7d7db
2022-06-23 09:45:35 +00:00
Rikin Kachhia
020e0bd841 docs: add hasuracon22 banner
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4826
GitOrigin-RevId: aea33ff304ab4fb228cb2cdfa978ea30fca2d918
2022-06-23 09:36:34 +00:00
hasura-bot
f23a8e4c42 docs: fix typo in event trigger docs
GITHUB_PR_NUMBER: 8616
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/8616

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4829
Co-authored-by: Jonathan Schneider <9538230+jonaschn@users.noreply.github.com>
GitOrigin-RevId: a7e4e5844357e5a9a24a2b2833c3171137b59891
2022-06-23 09:33:07 +00:00
Samir Talwar
8db9b77c77 server: Reorganize quasi-quoted names.
Pretty much all quasi-quoted names in the server code base have ended up in `Hasura.GraphQL.Parser.Constants`. I'm now finding this unpleasant for two reasons:

1. I would like to factor out the parser code into its own Cabal package, and I don't want to have to expose all these names.
2. Most of them really have nothing to do with the parsers.

In order to remedy this, I have:

1. moved the names used by parser code to `Hasura.GraphQL.Parser.DirectiveName`, as they're all related to directives;
2. moved `Hasura.GraphQL.Parser.Constants` to `Hasura.Name`, changing the qualified import name from `G` to `Name`;
3. moved names only used in tests to the appropriate test case;
4. removed unused items from `Hasura.Name`; and
5. grouped related names.

Most of the changes are simply changing `G` to `Name`, which I find much more meaningful.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4777
GitOrigin-RevId: a77aa0aee137b2b5e6faec94495d3a9fbfa1348b
2022-06-23 09:15:31 +00:00
Daniel Chambers
d896cc4d95 Replace Haskell DC Reference Agent with TypeScript DC Reference Agent in HSpec tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4689
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: 9dc6a2e373b3d7ab0bdce7ddcd7b7e6e5b1dc498
2022-06-23 08:09:46 +00:00
Varun Choudhary
866164357c console: support naming convention in source customization for postgres DB [CON-297]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4823
GitOrigin-RevId: a6a3bfcb9c7e16dd551d14dde3d424d07b8f1d15
2022-06-23 06:51:16 +00:00
Solomon
fbfa32207d Fixes asyncActionsFetchIntervalEnv help message.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4832
GitOrigin-RevId: 0acc9f5ab5eb4ba6ee2eb45d870a80df0be223c1
2022-06-23 05:07:13 +00:00
Solomon
cb10636177 Updates arg parser HGE header
## Description ✍️
The `--help` header was out of date. This PR updates it to match the description on github.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4831
GitOrigin-RevId: 449f71b2901318132e45445632b1a8af358c0afb
2022-06-23 01:28:30 +00:00
Abhijeet Khangarot
d704103d8b console: fix notifications not getting displayed on pro console
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4795
GitOrigin-RevId: f23f89683729092ace107f00515a3b90573e8f03
2022-06-22 19:20:01 +00:00