File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -268,10 +268,12 @@ class OperationsToProtoVisitor {
268268 // This ensures exact matching between GraphQL operation names and RPC method names
269269 // PascalCase: starts with uppercase, contains at least one lowercase letter
270270 if ( ! / ^ [ A - Z ] (? = .* [ a - z ] ) [ a - z A - Z 0 - 9 ] * $ / . test ( operationName ) ) {
271+ const suggestedName = upperFirst ( camelCase ( operationName ) ) ;
271272 throw new Error (
272273 `Operation name "${ operationName } " must be in PascalCase ` +
273274 `(start with uppercase letter, followed by mixed-case letters/numbers). ` +
274275 `Examples: GetUser, CreatePost, OnMessageAdded. ` +
276+ `Suggested name: "${ suggestedName } ". ` +
275277 `This ensures the RPC method name exactly matches the GraphQL operation name.` ,
276278 ) ;
277279 }
You can’t perform that action at this time.
0 commit comments