Skip to content

Commit

Permalink
fix(migration-engine): changed type of "compositeTypeDepth" from u32 …
Browse files Browse the repository at this point in the history
…to isize, fixing type mismatch issues with the TS cli (#3486)
  • Loading branch information
jkomyno committed Dec 12, 2022
1 parent ddfde0a commit 4e2b494
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion migration-engine/core/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ impl GenericApi for EngineState {
&params.schema,
None,
Box::new(move |connector| {
let composite_type_depth = From::from(params.composite_type_depth as isize);
let composite_type_depth = From::from(params.composite_type_depth);
let ctx = migration_connector::IntrospectionContext::new(schema, composite_type_depth);
Box::pin(async move {
// TODO(MultiSchema): Grab namespaces from introspect params?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ shape = "string"
shape = "bool"

[recordShapes.introspectParams.fields.compositeTypeDepth]
shape = "u32"
shape = "isize"

[recordShapes.introspectResult]
description = "Result type for the introspect method."
Expand Down
2 changes: 1 addition & 1 deletion migration-engine/json-rpc-api-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ fn validate(api: &Api) {
}

fn shape_exists(shape: &str, api: &Api) -> bool {
let builtin_scalars = ["string", "bool", "u32"];
let builtin_scalars = ["string", "bool", "u32", "isize"];

if builtin_scalars.contains(&shape) {
return true;
Expand Down
1 change: 1 addition & 0 deletions migration-engine/json-rpc-api-build/src/rust_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ fn rustify_type_name(name: &str) -> Cow<'static, str> {
match name {
"bool" => Cow::Borrowed("bool"),
"u32" => Cow::Borrowed("u32"),
"isize" => Cow::Borrowed("isize"),
"string" => Cow::Borrowed("String"),
other => other.to_camel_case().into(),
}
Expand Down

0 comments on commit 4e2b494

Please sign in to comment.