Skip to content

Commit

Permalink
Merge pull request #28 from hasura:update-sdk
Browse files Browse the repository at this point in the history
Update-sdk
  • Loading branch information
BenoitRanque authored Oct 1, 2024
2 parents 5800e39 + 1ca640a commit e359aed
Show file tree
Hide file tree
Showing 177 changed files with 4,492 additions and 5,056 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/deploy-stage.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Deploy connector to dockerhub, release cli on github
on:
pull_request:
branches:
- main
push:
branches:
- main
Expand Down Expand Up @@ -41,7 +44,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
push: true
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.0.3]

- Update SDK version to enable unauthorized access to health endpoint

## [1.0.2]

- Allow `DateTime64` shorthand for `DateTime64(3)`
Expand Down
146 changes: 137 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@ members = [
]
resolver = "2"

package.version = "1.0.2"
package.version = "1.0.3"
package.edition = "2021"

# insta performs better in release mode
[profile.dev.package]
insta.opt-level = 3
similar.opt-level = 3
7 changes: 7 additions & 0 deletions crates/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@ edition.workspace = true
[dependencies]
bytes = "1.6.0"
peg = "0.8.2"
indexmap = "2.1.0"
ndc-models = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.1.6" }
reqwest = { version = "0.12.3", features = [
"json",
"rustls-tls",
], default-features = false }
schemars = "0.8.16"
serde = { version = "1.0.197", features = ["derive"] }
serde_json = "1.0.114"
strum = { version = "0.26.3", features = ["derive"] }
tracing = "0.1.40"

[dev-dependencies]
insta = { version = "1.40.0", features = ["yaml", "glob", "json"] }
schemars = "0.8.16"
37 changes: 37 additions & 0 deletions crates/common/src/capabilities.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
use ndc_models::{
Capabilities, CapabilitiesResponse, ExistsCapabilities, LeafCapability, MutationCapabilities,
NestedFieldCapabilities, QueryCapabilities, RelationshipCapabilities, VERSION,
};

pub fn capabilities() -> Capabilities {
Capabilities {
query: QueryCapabilities {
aggregates: Some(LeafCapability {}),
variables: Some(LeafCapability {}),
explain: Some(LeafCapability {}),
nested_fields: NestedFieldCapabilities {
filter_by: None,
order_by: None,
aggregates: None,
},
exists: ExistsCapabilities {
nested_collections: None,
},
},
mutation: MutationCapabilities {
transactional: None,
explain: None,
},
relationships: Some(RelationshipCapabilities {
relation_comparisons: Some(LeafCapability {}),
order_by_aggregate: Some(LeafCapability {}),
}),
}
}

pub fn capabilities_response() -> CapabilitiesResponse {
CapabilitiesResponse {
version: VERSION.into(),
capabilities: capabilities(),
}
}
Loading

0 comments on commit e359aed

Please sign in to comment.