Commit Graph

8098 Commits

Author SHA1 Message Date
Rakesh Emmadi
0e822cc934 NDC response size limit (#439)
- Introduce a field in NDC `Configuration` struct that carries an
optional limit (`usize`) value.
  - When set, reject NDC response that is greater than the limit.
- Define a `HttpContext` struct that captures both `reqwest::Client` and
an optional limit value. Replace the `http_client` argument with
`http_context: &HttpContext` in all execute related functions.
- The `execute_query` function caller in multitenant code need to pass a
reference to `HttpContext` with appropriate NDC response size limit.

V3_GIT_ORIGIN_REV_ID: 85a3647c4d136cc8d887f343736cc011166f036f
2024-04-04 04:56:50 +00:00
Daniel Harvey
b66c43b645 use new Postgres mutations (#438)
<!-- Thank you for submitting this PR! :) -->

## Description

Set our `ndc-postgres` connector in tests to use new mutations versions
so we can test Boolean Expressions. Also does some house-keeping, like
ensuring we pull the latest `ndc-postgres` in CI and exposing `8080`
from `ndc-postgres` to fix local dev flow.

V3_GIT_ORIGIN_REV_ID: 4c92670e9976a3f75ec31e1224079799380ef6e2
2024-04-03 11:51:53 +00:00
Daniel Harvey
c53c581a00 resolve ValueExpression (#436)
<!-- Thank you for submitting this PR! :) -->

## Description

We'll shortly be adding `BooleanExpression` to `ValueExpression`, which
will require resolving the internal `ModelPredicate`. This PR adds a
resolving step for `ValueExpression` to simplify that later step. It is
essentially a no-op to introduce a new type.

V3_GIT_ORIGIN_REV_ID: 8bfe4a180e12ae50d8f131072886054c0e618ec4
2024-04-03 10:24:15 +00:00
Rakesh Emmadi
46cb1bfe44 refactor execute/ndc/client.rs (#435)
- Move redundant code in `client.rs` into a separate function.
- Doc utility functions through comments

V3_GIT_ORIGIN_REV_ID: f172ec2309b48c627f4ab9179efcb4c278e82989
2024-04-03 09:37:10 +00:00
Samir Talwar
59de1c3c33 Update the ndc-postgres dependency to the latest version. (#386)
This seems appropriate now that we've stabilized the new configuration.
Of note are the configuration updates and the use of an environment
variable to specify the connection URI. This upgrade also fixes the
health checks.

Regenerating the configuration lost the table descriptions, which seems
to be because they were not present in the Chinook SQL. I have dragged
the Chinook SQL in from ndc-postgres and kept it separate from the
initialization of other tables.

The auto-generated configuration is slightly different from the
manually-created configuration in that the collection names are
singular, not plural. This means that I had to change a lot of test
metadata files too.

V3_GIT_ORIGIN_REV_ID: 2b66fd3049aaf4daeb386915ea3b64a209b1f393
2024-04-03 08:04:07 +00:00
Abhinav Gupta
8142819ae0 Enforce titles are set on most metadata json schemas (#434)
- Adds titles to json schemas where missing
- Adds tests to ensure we don't miss titles in the future (modulo some
exceptions)

This is required to be able to autogenerate the docs for the metadata

V3_GIT_ORIGIN_REV_ID: e2027f3e3d5ee3546af99ff5c2d6de59604a3aec
2024-04-02 23:39:44 +00:00
Sean Park-Ross
89a5674bed Docs: Update versions dropdown
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10765
GitOrigin-RevId: f6826dfee3f5b76d060734cf096d51979a1a230d
2024-04-02 19:44:50 +00:00
Rakesh Emmadi
a434da835e Avoid using NDC client code from ndc-spec (#433)
Ref: https://github.com/hasura/ndc-spec/pull/130

- Avoid using NDC client code from ndc-spec for ndc API requests.
Instead, copy the client related code from ndc-spec into v3-engine.
- Code is copied into `.../execute/ndc/client.rs` module with the
following changes:
- API, configuration and error type related code is consolidated into a
single `client.rs` module.
- Derive error implementation for the error type using
`thiserror::Error` derive-macro
- Replace `opentelemetry` crate usage with `tracing_util` with necessary
changes
- Lot of redundant logic still there which will be addressed through
https://hasurahq.atlassian.net/browse/APG-53

V3_GIT_ORIGIN_REV_ID: 5766e407495c483cc4814d1286121b233aed3af0
2024-04-02 17:27:06 +00:00
Samir Talwar
5a0102b407 Avoid .unwrap in favor of anyhow for better error messages in tests. (#430)
I am struggling to diagnose some errors and `.unwrap` is not helping, as
it doesn't properly capture stack traces or anything else that might be
useful.

`anyhow` was built for this. Let's use it.

I had to convert `SessionError` to a real `Error`, which I don't think
is a bad thing.

V3_GIT_ORIGIN_REV_ID: 3b8a70bb87e12e7b9e39515cd5f769fbd2cbfb39
2024-04-02 17:06:56 +00:00
Tom Harding
ec62ea463c Run cargo fmt in CI (#431)
<!-- Thank you for submitting this PR! :) -->

## Description

When I run `cargo fmt` on my branches, it makes more diff than I want.
This PR fixes that by adding `just format` / `just fmt`, and adding it
to a CI job.

<!--
  Questions to consider answering:
  1. What user-facing changes are being made?
2. What are issues related to this PR? (Consider adding `(close
#<issue-no>)` to the PR title)
  3. What is the conceptual design behind this PR?
  4. How can this PR be tested/verified?
  5. Does the PR have limitations?
  6. Does the PR introduce breaking changes?
-->

## Changelog

- Add a changelog entry (in the "Changelog entry" section below) if the
changes in this PR have any user-facing impact. See [changelog
guide](https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide).
- If no changelog is required ignore/remove this section and add a
`no-changelog-required` label to the PR.

### Product
_(Select all products this will be available in)_
- [ ] community-edition
- [ ] cloud
<!-- product : end : DO NOT REMOVE -->

### Type
<!-- See changelog structure:
https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide#structure-of-our-changelog
-->
_(Select only one. In case of multiple, choose the most appropriate)_
- [ ] highlight
- [ ] enhancement
- [ ] bugfix
- [ ] behaviour-change
- [ ] performance-enhancement
- [ ] security-fix
<!-- type : end : DO NOT REMOVE -->

### Changelog entry
<!--
  - Add a user understandable changelog entry
- Include all details needed to understand the change. Try including
links to docs or issues if relevant
  - For Highlights start with a H4 heading (#### <entry title>)
  - Get the changelog entry reviewed by your team
-->

_Replace with changelog entry_

<!-- changelog-entry : end : DO NOT REMOVE -->

<!-- changelog : end : DO NOT REMOVE -->

V3_GIT_ORIGIN_REV_ID: e31e352f27b9ad0129c3759fead051b1a8d86758
2024-04-02 15:09:32 +00:00
Rakesh Emmadi
cc9cedc268 Set request payload limit to 10 MB (#429)
V3_GIT_ORIGIN_REV_ID: b0377caff0cb6c65b51179037e09e6eae9dc3bfb
2024-04-02 10:51:15 +00:00
Samir Talwar
8bee92864d Listen on any IPv4 or any IPv6 address. (#428)
## Description

Listening on `0.0.0.0` only binds to IPv4 addresses. We can listen on
IPv4 and IPv6 by using `::`.

I have opted to use the constants for this rather than parsing a string,
both for clarity and to avoid errors.

## Changelog

- Add a changelog entry (in the "Changelog entry" section below) if the
changes in this PR have any user-facing impact. See [changelog
guide](https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide).
- If no changelog is required ignore/remove this section and add a
`no-changelog-required` label to the PR.

### Product
_(Select all products this will be available in)_
- [x] community-edition
- [ ] cloud
<!-- product : end : DO NOT REMOVE -->

### Type
<!-- See changelog structure:
https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide#structure-of-our-changelog
-->
_(Select only one. In case of multiple, choose the most appropriate)_
- [ ] highlight
- [x] enhancement
- [ ] bugfix
- [ ] behaviour-change
- [ ] performance-enhancement
- [ ] security-fix
<!-- type : end : DO NOT REMOVE -->

### Changelog entry
<!--
  - Add a user understandable changelog entry
- Include all details needed to understand the change. Try including
links to docs or issues if relevant
  - For Highlights start with a H4 heading (#### <entry title>)
  - Get the changelog entry reviewed by your team
-->

The v3 engine now binds to all IPv4 and IPv6 addresses. Previously it
only used IPv4.

<!-- changelog-entry : end : DO NOT REMOVE -->

<!-- changelog : end : DO NOT REMOVE -->

V3_GIT_ORIGIN_REV_ID: d63b5544bfbf2ad067113980fa61dd74213c7b78
2024-04-02 10:17:41 +00:00
Samir Talwar
79039afbc0 Fix a bug in usage of mockito. (#421)
If we're running a mockito server in async tests, we must use
`new_async`.

The latest version enforces this.

V3_GIT_ORIGIN_REV_ID: cb58f248336c7bab08329d311b8b97b8244437a1
2024-04-02 08:23:12 +00:00
Divi
b08997c79b ci: update ubi base image
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10762
GitOrigin-RevId: 7e00d6a2f44b5e2698edde3af7e12e51b8742d51
2024-04-02 06:02:45 +00:00
Toan Nguyen
553578d351 docs: fix the pre-build dashboard boilerplate link
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10760
GitOrigin-RevId: e86117f0e0febf6ceeaacce61490aef4614ae972
2024-04-01 13:35:10 +00:00
Abhinav Gupta
18e249dcf4 Fail schema generation if relationship name conflicts with object field name (#423)
Fail schema generation if relationship name conflicts with object field
name

V3_GIT_ORIGIN_REV_ID: fcc979166bffe826c809e7992dd64afeff55c5f7
2024-03-30 19:04:31 +00:00
paritosh-08
dcd0cd4869 Fix explain for remote relationships (#422)
<!-- Thank you for submitting this PR! :) -->

## Description

Currently, the engine doesn't execute remote relationships in parallel
(even if it can). This PR fixes the explain to also reflect the same.

JIRA: https://hasurahq.atlassian.net/browse/V3ENGINE-60

Slack: https://hasurahq.slack.com/archives/C02G2M3C1T3/p1711643767793919
V3_GIT_ORIGIN_REV_ID: 53494c317cc7210f1dafd904d65def5c2d06a504
2024-03-29 10:32:27 +00:00
Varun Choudhary
002525a263 Add some info on API limit page
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10759
GitOrigin-RevId: 6be2b0d5dd8318b8065dfa5772e9c1b2d6496c67
2024-03-29 07:49:37 +00:00
Daniel Harvey
96e8028c01 make user-facing spans human readable (#419)
Most of our span names were in the format `snake_case` and usually
reflected `name_of_the_function`. This is unfriendly, so we've changed
it to match the format used by data connectors, which use a format like
"Database request" or "Waiting for connection".

It would be nice if `Execute request plan for query field` could be
`Execute request plan for query field "person"` but it seems changing
the currently used `&'static str` for `String` causes all sorts of other
lifetime issues, so I suppose we're better including more information as
span attributes instead. Therefore, all our span names need to be pretty
much static (or at least, dynamically chosen from a list of static
names).

Note: I have not changed the `SpanVisibility::Internal` span names for
now. Most of these reflect function names and this is pretty useful IMO.
Happy to change this later if other feel strongly though.
V3_GIT_ORIGIN_REV_ID: f2226b2466e8592676f3f4635d483289f0e3f6aa
2024-03-29 06:37:14 +00:00
Samir Talwar
3a1968317b Upgrade ndc-spec and opentelemetry, and add a traceresponse header. (#416)
<!-- Thank you for submitting this PR! :) -->

## Description

I have upgraded ndc-spec to v0.1.1. This pulls in an upgrade to
opentelemetry v0.22 so I've done that too.

We had issues with the `traceresponse` response header disappearing when
using an opentelemetry version > v0.20. This seems to be resolved here,
probably because we have pinned a single version of opentelemetry rather
than loading multiple at once. I added the `traceresponse` header to
verify this, and have left it in because it doesn't seem to hurt
anything.

I verified that everything works as expected with the OSS components,
but not multitenant.

## Changelog

- Add a changelog entry (in the "Changelog entry" section below) if the
changes in this PR have any user-facing impact. See [changelog
guide](https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide).
- If no changelog is required ignore/remove this section and add a
`no-changelog-required` label to the PR.

### Product
_(Select all products this will be available in)_
- [x] community-edition
- [x] cloud
<!-- product : end : DO NOT REMOVE -->

### Type
<!-- See changelog structure:
https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide#structure-of-our-changelog
-->
_(Select only one. In case of multiple, choose the most appropriate)_
- [ ] highlight
- [x] enhancement
- [ ] bugfix
- [ ] behaviour-change
- [ ] performance-enhancement
- [ ] security-fix
<!-- type : end : DO NOT REMOVE -->

### Changelog entry
<!--
  - Add a user understandable changelog entry
- Include all details needed to understand the change. Try including
links to docs or issues if relevant
  - For Highlights start with a H4 heading (#### <entry title>)
  - Get the changelog entry reviewed by your team
-->

v3 engine GraphQL queries now include a "traceresponse" header.

<!-- changelog-entry : end : DO NOT REMOVE -->

<!-- changelog : end : DO NOT REMOVE -->

V3_GIT_ORIGIN_REV_ID: f37b6bdb1331b55c49f0bd953f522f5eca298d1d
2024-03-28 16:21:22 +00:00
Samir Talwar
00e86292ac Upgrade indexmap and fix deprecation warnings. (#417)
`IndexMap::remove` has been deprecated in favor of
`IndexMap::swap_remove` (which has the same behavior, but is clearer
about breaking ordering) or `IndexMap::shift_remove`, which retains
order but is O(n) complexity.

I have taken a look at the areas where we use `.remove`. Where we
discard the map afterwards, I've changed it to `.swap_remove`. In one
case, we do return the data in the event of error, but we probably care
more about consistency of ordering than the actual precise order, so
I've used a `HashMap` and just sorted it instead.

V3_GIT_ORIGIN_REV_ID: 479e1013a4a9938f973b5ed85dbf3837896151e4
2024-03-28 15:24:03 +00:00
Tom Harding
fe6e99762e Group mutation nodes by connector (#406)
## Description

In order to implement transactions for the connectors that allow it, we
want to group mutation commands by connector. Then, we can execute a
group in a single transaction if possible, else just loop through it as
we always have. Grouping by connector also means we can access things
like capabilities for whole batches at a time.

## Changelog

- Add a changelog entry (in the "Changelog entry" section below) if the
changes in this PR have any user-facing impact. See [changelog
guide](https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide).
- If no changelog is required ignore/remove this section and add a
`no-changelog-required` label to the PR.

### Product
_(Select all products this will be available in)_
- [ ] community-edition
- [ ] cloud
<!-- product : end : DO NOT REMOVE -->

### Type
<!-- See changelog structure:
https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide#structure-of-our-changelog
-->
_(Select only one. In case of multiple, choose the most appropriate)_
- [ ] highlight
- [ ] enhancement
- [ ] bugfix
- [ ] behaviour-change
- [ ] performance-enhancement
- [ ] security-fix
<!-- type : end : DO NOT REMOVE -->

### Changelog entry
<!--
  - Add a user understandable changelog entry
- Include all details needed to understand the change. Try including
links to docs or issues if relevant
  - For Highlights start with a H4 heading (#### <entry title>)
  - Get the changelog entry reviewed by your team
-->

_Replace with changelog entry_

<!-- changelog-entry : end : DO NOT REMOVE -->

<!-- changelog : end : DO NOT REMOVE -->

V3_GIT_ORIGIN_REV_ID: 928715b78b214a3ac2452e8d1e5f33c87b20de33
2024-03-28 14:54:52 +00:00
Daniel Harvey
2ea7dbde76 re-add axum and machete-ignore it to fix tests run with cargo test (#418)
<!-- Thank you for submitting this PR! :) -->

## Description

For some reason, `cargo test` fails because of missing types in doc
comment code, but `cargo nextest run` in CI does not. Re-adding `axum`
as a dep dependency to `tracing-util` fixes this.

---------

Co-authored-by: Samir Talwar <samir.talwar@hasura.io>
V3_GIT_ORIGIN_REV_ID: 518e6faf702895d9c434056a57c40c2db6f4b0a8
2024-03-28 11:28:48 +00:00
Daniel Harvey
d99301f6f6 add just run-local command (#415)
<!-- Thank you for submitting this PR! :) -->

## Description

My memory is bad and I want to make it easy to run the `engine` to try
it out. This adds the `just run-local` command which uses the schema
from the tests (and so is very likely to continue working).

<img width="1445" alt="Screenshot 2024-03-28 at 09 44 46"
src="https://github.com/hasura/v3-engine/assets/4729125/5dc9a8d6-612e-418e-be24-ef0fefd0da99">
V3_GIT_ORIGIN_REV_ID: b5cd009b19805f5e9ed6180f68878207ece50d98
2024-03-28 10:27:18 +00:00
Samir Talwar
748bb3abab Remove unused dependencies using cargo machete. (#413)
`cargo machete` is a very useful tool that figures out when you aren't
using a dependency. I have run this locally to remove unused
dependencies.

I've also added a CI job to make sure we catch these in the future.

Sometimes it reports false positives, e.g. when a dependency isn't used
directly but in macro-generated code (e.g. with `strum`). I have added
`"ignored"` clauses to the `Cargo.toml` files where appropriate.

V3_GIT_ORIGIN_REV_ID: ed015089b695cec8eeb03ce455d6dd3cd312a016
2024-03-28 09:17:47 +00:00
Samir Talwar
04207e1c8f Improvements to Docker configuration. (#414)
- Use `rust-toolchain.toml` to specify tools.
- Drop the unused version field from the compose files.
- Use a modern Docker base for the dev-auth-webhook.
- Handle signals in the test servers so `docker stop` is quick.
- Upgrade Jaeger.

V3_GIT_ORIGIN_REV_ID: b5fee1d5dc953a1fdb0aabd75ba02df6846b7518
2024-03-28 08:52:55 +00:00
Anon Ray
1b4173011f fix empty input object types in introspection result when allowedFields for a type is empty (#412)
When there are no allowed fields for a type (via `TypePermissions`),
engine creates related input object types (like `<TypeName>OrderBy`)
with no fields. This results in an invalid introspection result. Client
libraries fail with validation error.

This PR fixes the issue.

V3_GIT_ORIGIN_REV_ID: a45a56b1f503f6ab99f250884957b6fc723cf9c8
2024-03-28 07:47:00 +00:00
Brandon Simmons
c60a2e7113 lang-graphql: limit recursion to avoid stack overflows
This was a simple solution to prevent crashes from the cases that I was
able to discover,  refactored into a macro that can be used elsewhere;
but I suspect there's a more idiomatic rust solution
(entailing a big refactor?). There's also the stacker crate, and see
also discussion here:
https://hasurahq.slack.com/archives/C04PUMV4X16/p1707337409839869?thread_ts=1701302324.058369&cid=C04PUMV4X16

Note that the compiled binary was built and fuzzed with `--release`.
Many discovered cases caused crashes  when run into non-optimized binary
(probably stack overflows but I did not look into it)

V3_GIT_ORIGIN_REV_ID: 31acfc9e358c807be80ba6a5efa78ace78306291
2024-03-27 23:03:27 +00:00
Brandon Simmons
508be3a185 Test some parser stack overflow panic cases found through fuzzing
V3_GIT_ORIGIN_REV_ID: c9140708c7244546cfab61db2487d62abc51ad38
2024-03-27 23:03:20 +00:00
Brandon Simmons
8d2f0d704b update ahash to keep buildable on rust nightly tkaitchuck/aHash#200
V3_GIT_ORIGIN_REV_ID: a36abced11359755423356f8a2311ae4514978de
2024-03-27 23:03:13 +00:00
Abhinav Gupta
d9a7af2e7f Give types / titles to all maps in the metadata jsonschema (#408)
Give types / titles to all maps in the metadata jsonschema

This helps in automatically generating the metadata docs page. Without a
title/type it's hard to refer to what is the type of the fields which
have a map type.

V3_GIT_ORIGIN_REV_ID: 8d13012b95910be13fdee6a7af1372f7b6cf2b89
2024-03-27 17:08:36 +00:00
Samir Talwar
4d2eb668d0 Alias ndc_client::models as ndc_models. (#411)
An upcoming version of ndc-spec will split out this module as a new
crate named `ndc_models`. This PR gets ahead of this change by aliasing
so that we can simply delete the `use` lines in the future.

This is a very boring, mechanical change that does not modify any
behavior at all.

V3_GIT_ORIGIN_REV_ID: 078d3f5fbc2961fcd93b924134de40ba693f0061
2024-03-27 13:21:43 +00:00
Anon Ray
df032bb1e3 opendd: remove deprecated namespace field from relationship target (#410)
Remove deprecated `namespace` field from relationship target. This is no
longer required, as no tooling doesn't depend on it.

Ref: https://hasurahq.slack.com/archives/C04NS5JCD8A/p1711527952823369
V3_GIT_ORIGIN_REV_ID: 70f2a71c1cb3d44411ec1eaf9c62bd790bf4cd12
2024-03-27 09:55:01 +00:00
Daniel Chambers
5e1d2cf506 Fix missing descriptions on GraphQL input object types (#409)
Fixes descriptions defined on `ObjectType`s and their fields in metadata
not showing up when that type is expressed as an input object type in
GraphQL.

V3_GIT_ORIGIN_REV_ID: de5cb2d545441fdebdf85fa84c90e9f0a4cbaac7
2024-03-27 07:09:38 +00:00
hasura-bot
13d36900f7 assets: update hasura logos
GITHUB_PR_NUMBER: 10178
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/10178

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10751
Co-authored-by: Jigyasu Arya <6664187+lastnamearya@users.noreply.github.com>
GitOrigin-RevId: 781c0d9ed3d8e61af4c773e971f960504de24a7d
2024-03-26 18:38:41 +00:00
hasura-bot
925757ddcb Documentation: Small Typo Fix on Observability Page
GITHUB_PR_NUMBER: 10179
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/10179

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10752
Co-authored-by: Seth McCombs <117682158+seth-acuitymd@users.noreply.github.com>
GitOrigin-RevId: 4aab60d575a9c0d67a905d60523112877d204fa4
2024-03-26 18:31:19 +00:00
Samir Talwar
50ff30ae5b Nix: Switch to nixpkgs-unstable, rather than nixos-unstable. (#407)
If we're going to be unstable, let's go all the way.

This change was motivated by needing to upgrade cargo-machete to make it
work with Rust v1.77, and not having the upgrade in nixos-unstable.

V3_GIT_ORIGIN_REV_ID: 8191a376a6aeebc08787f973d58d373f8ab9ad0d
2024-03-26 15:38:33 +00:00
Daniel Harvey
6881852b43 rename function to be clearer (#405)
<!-- Thank you for submitting this PR! :) -->

## Description

`check_conflicting_graphql_types` actually inserts a new GraphQL type
into a set (and explodes on failure).

Renamed to `store_new_graphql_type` which I feel is a bit clearer.

V3_GIT_ORIGIN_REV_ID: 4b774b9cd9e479c16f3de8af4df263f97cfab107
2024-03-26 14:33:02 +00:00
Tom Harding
ec9a3aabc1 Remove node-level mutation planning (#397)
## Description

We don't need the per-node mutation plan because, where at all possible,
we won't run per-node mutations. This change doesn't change the
behaviour of anything, but changes the structure of mutation plans to be
whole-request, rather than per-node.

## Changelog

- Add a changelog entry (in the "Changelog entry" section below) if the
changes in this PR have any user-facing impact. See [changelog
guide](https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide).
- If no changelog is required ignore/remove this section and add a
`no-changelog-required` label to the PR.

### Product
_(Select all products this will be available in)_
- [ ] community-edition
- [ ] cloud
<!-- product : end : DO NOT REMOVE -->

### Type
<!-- See changelog structure:
https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide#structure-of-our-changelog
-->
_(Select only one. In case of multiple, choose the most appropriate)_
- [ ] highlight
- [ ] enhancement
- [ ] bugfix
- [ ] behaviour-change
- [ ] performance-enhancement
- [ ] security-fix
<!-- type : end : DO NOT REMOVE -->

### Changelog entry
<!--
  - Add a user understandable changelog entry
- Include all details needed to understand the change. Try including
links to docs or issues if relevant
  - For Highlights start with a H4 heading (#### <entry title>)
  - Get the changelog entry reviewed by your team
-->

_Replace with changelog entry_

<!-- changelog-entry : end : DO NOT REMOVE -->

<!-- changelog : end : DO NOT REMOVE -->

V3_GIT_ORIGIN_REV_ID: 9accc9696fabd05f992c6245ccc411a781cf5790
2024-03-26 14:08:09 +00:00
Daniel Harvey
9e73dd7f81 Use correct crate folders in ci.docker-compose.yaml (#404)
<!-- Thank you for submitting this PR! :) -->

## Description

Missed this in https://github.com/hasura/v3-engine/pull/355, apologies.

V3_GIT_ORIGIN_REV_ID: 360b4a3a218f6ba754814c5b3083a8151a7886fb
2024-03-26 13:47:04 +00:00
Anon Ray
10e12d8acf remote joins: do not include the join field if it already exists (#402)
For remote joins, if join field already exists in the selection set, do
not request it again. Include the join field only if it is not in the
selection set.

A field selection might be expensive, so we do not want to duplicate it.

Fixes: https://hasurahq.atlassian.net/browse/V3API-296
V3_GIT_ORIGIN_REV_ID: d09e4298557ca098433b0758c15703295ccbfd39
2024-03-26 10:25:43 +00:00
Daniel Harvey
dda2fb8eca more explicit data flow in metadata resolver (#403)
<!-- Thank you for submitting this PR! :) -->

## Description

As noted in https://github.com/hasura/v3-engine/pull/398, the metadata
resolver works by passing a lot of mutable references around, making the
flow of data quite difficult to follow. This changes the passing of
`types` to make it more explicit. Where possible, any mutation is pushed
up to the top-level, or we return owned values.

V3_GIT_ORIGIN_REV_ID: 61251929cbc9b9410fabba85b58738037dfcb586
2024-03-26 09:59:13 +00:00
Naveen Naidu
ea98418833 cli: update go-git to v5.11
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10750
GitOrigin-RevId: da716e72dcf8bf1052e19248e7a96de983b23e90
2024-03-26 09:24:24 +00:00
Daniel Harvey
b6f6d48027 better name for resolve_data_connector_type_mappings in metadata resolver (#401)
<!-- Thank you for submitting this PR! :) -->

## Description

Addressing
https://github.com/hasura/v3-engine/pull/398#discussion_r1538623981

V3_GIT_ORIGIN_REV_ID: 8f9c4f95fd2c57246693168c901640872b479741
2024-03-26 08:55:25 +00:00
Anon Ray
7dd3dfa235 gardening: split remote joins into smaller modules (#400)
No-op change. Splits `execute/remote_joins.rs` into smaller modules -
`execute/remote_joins/collect.rs` and `execute/remote_joins/join.rs`

V3_GIT_ORIGIN_REV_ID: 15d4e7dc313843691d44d5f9488134c83ffddfea
2024-03-26 07:29:49 +00:00
Phil Curzon
be93dd2a6a Fix json schema description spelling errors (#399)
## Description

Fixes various spelling errors in the JSON schema descriptions.

No behavioural changes.

V3_GIT_ORIGIN_REV_ID: 56454b3193baa8257caa6116a35fbdda4be1d5eb
2024-03-26 05:51:47 +00:00
Daniel Harvey
2743dbc479 split up resolving metadata into functions (#398)
<!-- Thank you for submitting this PR! :) -->

## Description

Was trying to work out where mutation was happening in this massive
function, so broke it up into lots of smaller functions so it's easier
to tell from the inputs what is going on. There is definitely lots of
room for improvement here, have avoided making any functional changes in
lieu of just mechanically moving the code.

Behavioural no-op.

V3_GIT_ORIGIN_REV_ID: 19fa239319d348d486eb18e15d62614d6af2bd9b
2024-03-25 15:21:06 +00:00
Daniel Harvey
4b8f62d399 Break GraphqlConfigError out of large Error type (#396)
<!-- Thank you for submitting this PR! :) -->

## Description

The `Error` enum in `resolved/error.rs` is absolutely giant. Going to
break it down into smaller structures, this is the first of those. There
are probably some missing items in here, but I am starting with rough
cuts and expect the right place for everything to appear over time.

No behavioural change.

V3_GIT_ORIGIN_REV_ID: 69d4ae880ad9cbffdc66adde10996e9f92cee8f4
2024-03-25 14:36:49 +00:00
Rob Dominguez
2e07ddbc02 Docs: add not for mongo filtering capabilities
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10749
GitOrigin-RevId: ebe8dd4fd5dcfd05aca9a70855fe016eadbee0bf
2024-03-25 13:07:09 +00:00
Naveen Naidu
f0e6c51e79 cli: upgrade go-git to v5.4.2 and go version to 1.18
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10741
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
Co-authored-by: Mohd Bilal <24944223+m-Bilal@users.noreply.github.com>
GitOrigin-RevId: 1008b4abfb0fe12c5c7fdbdbe47a0820435b595c
2024-03-25 11:25:31 +00:00