Skip to content

Commit 4d36def

Browse files
committed
test: update tests in apollo-smith
1 parent 94dcf38 commit 4d36def

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

crates/apollo-parser/src/parser/grammar/variable.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,8 @@ pub(crate) fn variable_definitions(p: &mut Parser) {
2626
}
2727

2828
// Continue parsing while we see descriptions or variables
29-
loop {
30-
match p.peek() {
31-
Some(TokenKind::StringValue | T![$]) => variable_definition(p),
32-
_ => break,
33-
}
29+
while let Some(TokenKind::StringValue | T![$]) = p.peek() {
30+
variable_definition(p);
3431
}
3532

3633
p.expect(T![')'], S![')']);

crates/apollo-smith/src/fragment.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub struct FragmentDef {
2525
impl From<FragmentDef> for ast::Definition {
2626
fn from(x: FragmentDef) -> Self {
2727
ast::FragmentDefinition {
28+
description: None,
2829
name: x.name.into(),
2930
type_condition: x.type_condition.name.into(),
3031
directives: Directive::to_ast(x.directives),

crates/apollo-smith/src/operation.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ pub struct OperationDef {
2828
impl From<OperationDef> for ast::Definition {
2929
fn from(x: OperationDef) -> Self {
3030
ast::OperationDefinition {
31+
description: None,
3132
operation_type: x.operation_type.into(),
3233
name: x.name.map(Into::into),
3334
directives: Directive::to_ast(x.directives),

crates/apollo-smith/src/variable.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pub struct VariableDef {
2727
impl From<VariableDef> for ast::VariableDefinition {
2828
fn from(x: VariableDef) -> Self {
2929
Self {
30+
description: None,
3031
name: x.name.into(),
3132
ty: Node::new(x.ty.into()),
3233
default_value: x.default_value.map(|x| Node::new(x.into())),

0 commit comments

Comments
 (0)