overblog / GraphQLBundle

This bundle provides tools to build a complete GraphQL API server in your Symfony App.
MIT License
780 stars 223 forks source link

Restrict to send JSON request as string (object expected) #1190

Open vladdnepr opened 3 weeks ago

vladdnepr commented 3 weeks ago
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Documented? no
Fixed tickets
License MIT

Return value of getParsedBody must be array. But passed string will cause TypeError

Example

fetch("ENDPOINT", {
  "headers": {
    "content-type": "application/json",
  },
  "body": "111",
  "method": "POST"
});