Github GraphQL JSON schema is not parseable for the xcode

Can anyone share the command to download proper format schema.json. 

I have been using the following command to download schema but the downloaded schema is not parseable  

apollo schema:download --endpoint= --header="Authorization: bearer <token>" --header="Accept: application/vnd.github.v4.idl" > schema.json

With apollo I’ve been using schema files from octokit I also tried to build it with apollo but didn’t want to waste more time as that octokit schemas works and are updated regularly.