<!-- 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
`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
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
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
## Description
Fixes various spelling errors in the JSON schema descriptions.
No behavioural changes.
V3_GIT_ORIGIN_REV_ID: 56454b3193baa8257caa6116a35fbdda4be1d5eb
<!-- Thank you for submitting this PR! :) -->
## Description
This PR adds the capability to expose _entities and _service fields.
Apollo Federation uses these fields to extend types in other subgraphs
using the types from a subgraph. We can now use Hasura v3 as a subgraph
in an Apollo federated supergraph.
To make this possible, we had to do the following metadata changes:
- Add `apolloFederation` in `ObjectType.graphql`:
```yaml
apolloFederation:
keys:
- fields:
- id
```
- Add `apolloFederation` in `Model.graphql`:
```yaml
apolloFederation:
entitySource: true
```
- Add `apolloFederation` in `GraphqlConfig`:
```yaml
apolloFederation:
enableRootFields: true
```
https://github.com/hasura/v3-engine/assets/85472423/b3223c61-360a-4ed6-b8ab-b394469957ce
RFC:
https://github.com/hasura/graphql-engine/pull/10141/files#diff-a9f74850aca6ecad1556723e4b3c7395e59f26cd40d9de20bfef83cb9c64f028
## 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: 73cb9e6c8ef4bfe64d0f0cd9ce3ccbd32e208712
This means that we can pass arguments to the Criterion benchmarks
because the test binaries do not try and run.
For example, if you run this:
```
cargo bench -- --warm-up-time=1 --measurement-time=1
```
… it will currently fail, because it will also pass these arguments to
the tests. Disabling the benchmarks for the tests fixes this.
V3_GIT_ORIGIN_REV_ID: 10fe0683b82c506e1a11b24ca0a0a4041e37b655
Add `serde(deny_unknown_fields)` attribute for `Deprecated` struct. In
v3-metadata-build-service, there's a test to ensure no arbitrary
additional properties exists for any schema definition except
`JWTClaimsMap` struct. It actually caught the missing
`deny_unknown_fields` attribute for `Deprecated` struct. This PR also
includes the same test to catch such misses in the future.
V3_GIT_ORIGIN_REV_ID: 2c0a9d2efcd76946885f2e54a364a388e80c283b
Add an optional `deprecated` key to the following OpenDD metadata
- Object type field definitions
- Model select unique and select many graphql API
- Command GraphQL API
- Relationship
The `deprecated` value is an object with an optional `reason` key.
```
"deprecated": {
"reason": "Optional reason"
}
```
Produce `@deprecated` against GraphQL fields generated from
aforementioned OpenDD metadata using `deprecated` config.
V3_GIT_ORIGIN_REV_ID: b26fe8a8b62de24d04820578b8201d3ff8585375
<!-- Thank you for submitting this PR! :) -->
## Description
Following on https://github.com/hasura/v3-engine/pull/340 (and stacked
on top of it, as such) - this adds preset arguments for models, allowing
hard coded values for different roles.
```yaml
kind: ModelPermissions
version: v1
definition:
modelName: ActorsByMovie
permissions:
- role: admin
select:
filter:
argumentPresets:
- argument: movie_id
value:
literal: 3
```
<!--
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)_
- [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
-->
Allow setting preset values for arguments on models, based on user's
role.
<!-- changelog-entry : end : DO NOT REMOVE -->
<!-- changelog : end : DO NOT REMOVE -->
V3_GIT_ORIGIN_REV_ID: 7dd23bf78e92980384cb2b2e109305cdb42d1c0b
<!-- Thank you for submitting this PR! :) -->
## Description
This moves all the crates into a `/crates` folder. Everything appears to
just work, thanks Cargo!
V3_GIT_ORIGIN_REV_ID: 8e3ef287b1a46cabdb4d919a50e813ab2cddf8b1