overblog / GraphQLBundle

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

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

Open vladdnepr opened 4 months ago

vladdnepr commented 4 months 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"
});