I'm having issues creating a schema.json file that can be parsed with babel-relay-plugin without running into an error. Taking a look at the schema.json file included in relay's example folder, I tried to copy the query in GraphiQL but I can't seem to get it right. I'm using Laravel as the backend. Is this something I can accomplish through GraphiQL or sending a request to the GraphQL endpoint and saving the response?
The error occurring when attempting to parse the schema.json file:
Cannot read property 'reduce' of undefined while parsing file: /Users/username/Sites/Homestead/Code/ineedmg-graphql/resources/assets/js/app.js
Last attempt using GraphiQL:
{
__schema {
queryType {
name
},
types {
kind,
name,
description,
fields {
name,
description,
type {
name,
kind,
ofType {
name
description
}
}
isDeprecated,
deprecationReason,
},
inputFields {
name
description
}
interfaces {
kind
name
description
},
enumValues {
name
description
isDeprecated
deprecationReason
}
},
mutationType {
name
},
directives {
name,
description,
onOperation,
onFragment,
onField,
args {
name
description
defaultValue
}
}
}
}