Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

line break issue #122

Open
littlelouishu opened this issue Jan 31, 2023 · 0 comments
Open

line break issue #122

littlelouishu opened this issue Jan 31, 2023 · 0 comments

Comments

@littlelouishu
Copy link

littlelouishu commented Jan 31, 2023

Request failed when some value has the line break like \n in it.

It's a bug, or my code missing necessary escape porcess?

I tried escape the \n to \\n in json value. But ther sever side treated the \\n to \n as string instead of line breaker. It's server side's fault?

client.reactiveExecuteQuery(queryRequest.serialize())
client is a instance of [WebClientGraphQLClient]

com.netflix.graphql.dgs.client.GraphQLClientException: 400 BAD_REQUEST "GraphQL server org.springframework.web.reactive.function.client.DefaultWebClient@59d42d75 responded with status code 400: '{"errors":[{"message":"Syntax Error: Unterminated string.","locations":[{"line":1,"column":107}],"extensions":{"code":"GRAPHQL_PARSE_FAILED"}}]} '. The request sent to the server was {"query":"mutation {createProduct(input: {categoryId:\"puaRCidQs8nVVNcXWbpgoZ\", condition:BRAND_NEW, description:\"サイズ\nS ( 身幅:60cm 着丈:119cm 肩幅:45cm 袖丈:66cm) M ( 身幅:62cm 着丈:120cm 肩幅:46cm 袖丈:67cm) L ( 身幅:64cm 着丈:121cm 肩幅:47cm 袖丈:68cm) XL ( 身幅:66cm 着丈:122cm 肩幅:48cm 袖丈:69cm) XXL ( 身幅:68cm 着丈:123cm 肩幅:49cm 袖丈:70cm)\n素材\n表地:ポリエステル100% 裏地:ポリエステル100% 中わた:ポリエステル100% その他:ポリエステル87%、ポリウレタン13%\n生産国\nベトナム\n\", imageUrls:[\"https://stc.milleporte.com/EVENTS/221105UNDE/web/960/4580637165083_1.jpg\", \"https://stc.milleporte.com/EVENTS/221105UNDE/web/960/4580637165083_2.jpg\"], name:\"UA LONG COAT WORD LOGO ブラック\", price:10460, shippingDuration:FOUR_TO_SEVEN_DAYS, shippingFromStateId:\"jp11\", shippingMethod:UNDECIDED, shippingPayer:SELLER, status:OPENED, variants:[{janCode:\"\", name:\"XL\", skuCode:\"16830662\", stockQuantity:1 }] }){ product { id variants { skuCode id } } } }","variables":{},"operationName":null}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant