Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
Move Report type to it's own file. (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepycat authored and sastels committed Dec 4, 2018
1 parent 64e6fc7 commit e5e7089
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
21 changes: 21 additions & 0 deletions api/src/Report.js
Original file line number Diff line number Diff line change
@@ -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
19 changes: 1 addition & 18 deletions api/src/schema.js
Original file line number Diff line number Diff line change
@@ -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',
Expand Down

0 comments on commit e5e7089

Please sign in to comment.