pub fn escape_graphql_string(s: &str, _context: EscapeContext) -> StringExpand description
Escape a string for use in GraphQL SDL (Schema Definition Language) as a complete quoted string.
This handles escaping for string values within GraphQL SDL (like argument defaults, directive values, etc.), which use standard GraphQL string escaping rules.
§Arguments
s- The string to escapecontext- The target language context
§Returns
A string escaped for safe embedding in GraphQL SDL quoted strings
§Examples
use spikard_cli::codegen::common::escaping::{EscapeContext, escape_graphql_string};
// Standard GraphQL string escaping
assert_eq!(escape_graphql_string("hello \"world\"", EscapeContext::Rust), "hello \\\"world\\\"");