Skip to content

Commit

Permalink
Merge pull request #460 from Enselic/more-help
Browse files Browse the repository at this point in the history
Improve error message when query name is missing
tomhoule authored Jan 9, 2024
2 parents c52e89e + b1173b0 commit 5ffb8a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graphql_client_codegen/src/query.rs
Original file line number Diff line number Diff line change
@@ -154,7 +154,7 @@ where
) => {
let on = schema.query_type();
let resolved_operation: ResolvedOperation = ResolvedOperation {
name: q.name.as_ref().expect("query without name").as_ref().into(),
name: q.name.as_ref().expect("query without name. Instead of `query (...)`, write `query SomeName(...)` in your .graphql file").as_ref().into(),
_operation_type: operations::OperationType::Query,
object_id: on,
selection_set: Vec::with_capacity(q.selection_set.items.len()),

0 comments on commit 5ffb8a9

Please sign in to comment.