Skip to content

Commit

Permalink
Updated to NDC v0.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-chambers committed Aug 26, 2024
1 parent 40448c6 commit 603f23d
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

59 changes: 58 additions & 1 deletion src/schema/schema.generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,15 @@
"$ref": "#/definitions/NestedFieldCapabilities"
}
]
},
"exists": {
"description": "Does the connector support EXISTS predicates",
"default": {},
"allOf": [
{
"$ref": "#/definitions/ExistsCapabilities"
}
]
}
}
},
Expand Down Expand Up @@ -177,6 +186,23 @@
}
}
},
"ExistsCapabilities": {
"title": "Exists Capabilities",
"type": "object",
"properties": {
"nested_collections": {
"description": "Does the connector support ExistsInCollection::NestedCollection",
"anyOf": [
{
"$ref": "#/definitions/LeafCapability"
},
{
"type": "null"
}
]
}
}
},
"MutationCapabilities": {
"title": "Mutation Capabilities",
"type": "object",
Expand Down Expand Up @@ -684,7 +710,7 @@
]
},
"name": {
"description": "The name can refer to a primitive type or a scalar type",
"description": "The name can refer to a scalar or object type",
"type": "string"
}
}
Expand Down Expand Up @@ -1983,6 +2009,37 @@
}
}
}
},
{
"type": "object",
"required": [
"column_name",
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"nested_collection"
]
},
"column_name": {
"type": "string"
},
"arguments": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/Argument"
}
},
"field_path": {
"description": "Path to a nested collection via object columns",
"type": "array",
"items": {
"type": "string"
}
}
}
}
]
},
Expand Down
23 changes: 22 additions & 1 deletion src/schema/schema.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export type Type =
| {
type: "named";
/**
* The name can refer to a primitive type or a scalar type
* The name can refer to a scalar or object type
*/
name: string;
}
Expand Down Expand Up @@ -343,6 +343,17 @@ export type ExistsInCollection =
arguments: {
[k: string]: RelationshipArgument;
};
}
| {
type: "nested_collection";
column_name: string;
arguments?: {
[k: string]: Argument;
};
/**
* Path to a nested collection via object columns
*/
field_path?: string[];
};
export type RelationshipType = "object" | "array";
/**
Expand Down Expand Up @@ -411,6 +422,10 @@ export interface QueryCapabilities {
* Does the connector support nested fields
*/
nested_fields?: NestedFieldCapabilities;
/**
* Does the connector support EXISTS predicates
*/
exists?: ExistsCapabilities;
}
/**
* A unit value to indicate a particular leaf capability is supported. This is an empty struct to allow for future sub-capabilities.
Expand All @@ -430,6 +445,12 @@ export interface NestedFieldCapabilities {
*/
aggregates?: LeafCapability | null;
}
export interface ExistsCapabilities {
/**
* Does the connector support ExistsInCollection::NestedCollection
*/
nested_collections?: LeafCapability | null;
}
export interface MutationCapabilities {
/**
* Does the connector support executing multiple mutations in a transaction.
Expand Down
2 changes: 1 addition & 1 deletion src/schema/version.generated.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = "0.1.5";
export const VERSION = "0.1.6";
2 changes: 1 addition & 1 deletion typegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
ndc-models = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.1.5" }
ndc-models = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.1.6" }
schemars = "0.8.15"
serde = "^1.0"
serde_json = "1.0.107"
Expand Down

0 comments on commit 603f23d

Please sign in to comment.