2016-06-08 85 views
1

我想在Graphql請求發送雙引號(「)和反斜線(\),並希望把它找回來響應發送雙引號和反斜線Graphql要求

請檢查波紋管例如:

mutation M { 
    signUp 
    (
     name: "Harsha Vardhan" 
     username: "Harsha143", 
     email: "[email protected]", 
     description: "Cool "boy" \n And good looking." 
    ) 
    { 
     _id, 
     name 
     username, 
     email, 
     description 
} 

在上述突變我想送雙引號和回描述凶多吉少。請指導我克服這一點。

在此先感謝。

+0

你試過逃避那些角色嗎? ''酷\「男孩\ \ \並且好看。」' –

回答

1

你應該ŧ ry以逃避那些字符像這樣

mutation M { 
    signUp 
    (
     name: "Harsha Vardhan" 
     username: "Harsha143", 
     email: "[email protected]", 
     description: "Cool \"boy\" \\n And good looking." 
    ) 
    { 
     _id, 
     name 
     username, 
     email, 
     description 
} 

希望幫助!

相關問題