Skip to content

Commit

Permalink
Allow ast_diff_in_doc drops machine readable struct
Browse files Browse the repository at this point in the history
Reviewed By: schaitoff

Differential Revision: D46989358

fbshipit-source-id: ca6d142eaf0696f998aafa9ebb64baa0ae4101b6
  • Loading branch information
ginfung authored and facebook-github-bot committed Jun 26, 2023
1 parent 34a3581 commit 091a4f0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions compiler/crates/graphql-syntax/src/node/executable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ impl ExecutableDefinition {
.any(|d| d.name.value == directive_name),
}
}

pub fn selections(&self) -> &[Selection] {
match self {
ExecutableDefinition::Operation(node) => &node.selections.items,
ExecutableDefinition::Fragment(node) => &node.selections.items,
}
}
}

impl fmt::Debug for ExecutableDefinition {
Expand Down

0 comments on commit 091a4f0

Please sign in to comment.