-
Notifications
You must be signed in to change notification settings - Fork 223
Closed
Labels
Description
Q | A |
---|---|
Bug report? | no |
Feature request? | yes |
BC Break report? | yes |
RFC? | no |
Version/Branch | master |
Although I could not find a official specification on the topic, the official babel-plugin-relay
plugin from Facebook (Relay Modern) expects the JSON schema to be enclosed in a data
object. This is what is generated from the graphql:dump-schema
:
{
"__schema": {}
}
And this is what the plugin expects:
{
"data": {
"__schema": {}
}
}
The problem relies at GraphQLDumpSchemaCommand#82 where the json_encode
function is applied on the data
element instead of the $result
variable itself. Changing this would indeed be a BC break, but at the moment the JSON schema is unusable with the Relay Modern compiler