diff --git a/api/src/Report.js b/api/src/Report.js new file mode 100644 index 000000000..f6adc29d4 --- /dev/null +++ b/api/src/Report.js @@ -0,0 +1,21 @@ +const { GraphQLObjectType, GraphQLString } = require('graphql') + +const Report = new GraphQLObjectType({ + name: 'Report', + fields: () => ({ + whatHappened: { + type: GraphQLString, + }, + whatWasInvolved: { + type: GraphQLString, + }, + whatWasInvolvedOther: { + type: GraphQLString, + }, + howWereYouAffected: { + type: GraphQLString, + }, + }), +}) + +module.exports.Report = Report diff --git a/api/src/schema.js b/api/src/schema.js index c57dc47d7..f347f2d04 100644 --- a/api/src/schema.js +++ b/api/src/schema.js @@ -1,23 +1,6 @@ const { GraphQLSchema, GraphQLObjectType, GraphQLString } = require('graphql') const { Stats } = require('./Stats') - -var Report = new GraphQLObjectType({ - name: 'Report', - fields: () => ({ - whatHappened: { - type: GraphQLString, - }, - whatWasInvolved: { - type: GraphQLString, - }, - whatWasInvolvedOther: { - type: GraphQLString, - }, - howWereYouAffected: { - type: GraphQLString, - }, - }), -}) +const { Report } = require('./Report') const query = new GraphQLObjectType({ name: 'Query',