gpt4 book ai didi

graphql - 在 Graphql 请求中发送双引号和反斜杠

转载 作者:行者123 更新时间:2023-12-05 00:18:27 27 4
gpt4 key购买 nike

我想在 Graphql 请求中发送双引号(")和反斜杠(\),并希望将其取回作为响应。

请检查以下示例:

mutation M { 
signUp
(
name: "Harsha Vardhan"
username: "Harsha143",
email: "harshavardhan@sample.com",
description: "Cool "boy" \n And good looking."
)
{
_id,
name
username,
email,
description
}

在上面的 Mutation 中,我想在描述中发送双引号和反斜杠。请指导我克服这个问题。

提前致谢。

最佳答案

你应该尝试像这样转义这些字符

mutation M { 
signUp
(
name: "Harsha Vardhan"
username: "Harsha143",
email: "harshavardhan@sample.com",
description: "Cool \"boy\" \\n And good looking."
)
{
_id,
name
username,
email,
description
}

希望有帮助!

关于graphql - 在 Graphql 请求中发送双引号和反斜杠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37709250/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com