Skip to content

Commit

Permalink
Fix object literal in array literal
Browse files Browse the repository at this point in the history
  • Loading branch information
0e4ef622 committed Jan 22, 2024
1 parent 36fea20 commit cae320d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cynic-codegen/src/fragment_derive/arguments/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl ToTokens for ArgumentValueTokens<'_> {
for item in items {
let inner = self.wrap_value(item);
tokens.append_all(quote! {
.item(|builder| { builder #inner })
.item(|builder| { builder #inner; })
})
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ impl cynic::QueryFragment for MyQuery {
builder
.value()
.list()
.item(|builder| builder.literal(PostStatePosted))
.item(|builder| builder.literal(PostStatePosted));
.item(|builder| {
builder.literal(PostStatePosted);
})
.item(|builder| {
builder.literal(PostStatePosted);
});
});
}
<Vec<BlogPostOutput> as cynic::QueryFragment>::query(field_builder.select_children());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ impl cynic::QueryFragment for MyQuery {
builder
.value()
.list()
.item(|builder| builder.literal(PostStatePosted))
.item(|builder| builder.literal(PostStateDraft));
.item(|builder| {
builder.literal(PostStatePosted);
})
.item(|builder| {
builder.literal(PostStateDraft);
});
});
}
<Vec<BlogPostOutput> as cynic::QueryFragment>::query(field_builder.select_children());
Expand Down

0 comments on commit cae320d

Please sign in to comment.