Skip to content

Commit

Permalink
fix: parsing array responses (#1587)
Browse files Browse the repository at this point in the history
  • Loading branch information
davenewza authored Sep 9, 2024
1 parent ac3be58 commit f1d84c7
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 71 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { ReadComplex, permissions } from "@teamkeel/sdk";

export default ReadComplex(async (ctx, inputs) => {
permissions.allow();
return inputs;
});
10 changes: 10 additions & 0 deletions integration/testdata/functions_custom/schema.keel
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ message SinglePersonResponse {
person Person
}

message ComplexMessage {
msg ComplexInnerMessage
msgArray ComplexInnerMessage[]
}

message ComplexInnerMessage {
texts Text[]
}

model Person {
fields {
name Text
Expand All @@ -78,6 +87,7 @@ model Person {
write updateWithFile(FileInput) returns (SinglePersonResponse)
write updatePhoto(id, photo) returns (SinglePersonResponse)
read readFile(id) returns (Any)
read readComplex(ComplexMessage) returns (ComplexMessage)
}
}

Expand Down
Loading

0 comments on commit f1d84c7

Please sign in to comment.