From 6b93146c4d9e35ef24923de9e4174cd329975039 Mon Sep 17 00:00:00 2001 From: itojum Date: Tue, 16 Jun 2026 12:06:04 +0900 Subject: [PATCH] docs: fix variable name in dynamic query error guide Correct `HeroNameQuery` to `hero_query` to fix the broken example. --- guides/dynamic-query-error.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/dynamic-query-error.md b/guides/dynamic-query-error.md index 616dd3f9..a9e3e20f 100644 --- a/guides/dynamic-query-error.md +++ b/guides/dynamic-query-error.md @@ -23,7 +23,7 @@ hero_query = SWAPI::Client.parse <<-'GRAPHQL' } } GRAPHQL -result = SWAPI::Client.query(HeroNameQuery, variables: { id: params[:id] }) +result = SWAPI::Client.query(hero_query, variables: { id: params[:id] }) ``` Parsing a query and validating a query on every request adds performance overhead. It also prevents validation errors from being discovered until request time, rather than when the query is parsed at startup.