microsoft / cppgraphqlgen

C++ GraphQL schema service generator
MIT License
323 stars 45 forks source link

Incorrect handling of UnicodeBOM in GraphQL grammar #304

Closed gruzdev closed 6 days ago

gruzdev commented 1 month ago

UnicodeBOM must be ignored everywhere in a document not just at the beginning.

gruzdev commented 4 weeks ago

And this is how Apollo just ignores UTF-8 BOM after opening curly:

$ echo -ne '{"query": "{\xEF\xBB\xBF__typename }"}' | curl -X POST -H "Content-Type: application/json" --data-binary @- http://localhost:4000
{"data":{"__typename":"Query"}}