Skip to content

Commit fde76cb

Browse files
committed
Store results in ResolverResult until final return
1 parent b1b734b commit fde76cb

File tree

81 files changed

+919
-999
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+919
-999
lines changed

include/graphqlservice/GraphQLGrammar.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,14 @@ void on_first_child_if(const ast_node& n, std::function<bool(const ast_node&)>&&
4949
template <typename Rule>
5050
void on_first_child(const ast_node& n, std::function<void(const ast_node&)>&& func)
5151
{
52-
on_first_child_if<Rule>(n, [funcVoid = std::move(func)](const ast_node& child) {
53-
funcVoid(child);
54-
return true;
55-
});
52+
for (const auto& child : n.children)
53+
{
54+
if (child->is_type<Rule>())
55+
{
56+
func(*child);
57+
return;
58+
}
59+
}
5660
}
5761

5862
// https://facebook.github.io/graphql/June2018/#sec-Source-Text

0 commit comments

Comments
 (0)