File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
src/FSharp.Data.GraphQL.Shared
tests/FSharp.Data.GraphQL.Tests Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,13 @@ module internal Internal =
8787 ( hex2int h3)* 4096 + ( hex2int h2)* 256 + ( hex2int h1)* 16 + hex2int h0 |> char)
8888 pchar '\\' >>. ( escaped <|> unicode)
8989
90- let normalCharacter = noneOf [| '\u000A';' \u000D';' \u2028';' \u2029';' " ';'\' '|]
90+ let normalCharacter =
91+ noneOf
92+ [| '\u000A'
93+ '\u000D'
94+ '\u2028'
95+ '\u2029'
96+ '"' |]
9197 let quote = pchar '"'
9298
9399 between quote quote ( manyChars ( escapedCharacter <|> normalCharacter))
Original file line number Diff line number Diff line change @@ -306,6 +306,19 @@ let ``parser should parse query with quoted arguments``() =
306306 }
307307 }"""
308308
309+ [<Fact>]
310+ let ``parser should parse query with single - quoted arguments`` () =
311+ let expected =
312+ [ field " id" ]
313+ |> fieldWithNameAndArgsAndSelections " search" [ argString " query" " It's working!" ]
314+ |> queryWithSelection
315+ |> doc1
316+ test expected """ {
317+ search(query: "It's working!") {
318+ id
319+ }
320+ }"""
321+
309322[<Fact>]
310323let ``parser should parse query with arguments`` () =
311324 let expected =
You can’t perform that action at this time.
0 commit comments