|  | @@ -30,7 +30,7 @@ const typeDefs = `
 | 
	
		
			
				|  |  |      addresses: [ NetworkAddress ]!
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -  extend type Query {
 | 
	
		
			
				|  |  | +  type System {
 | 
	
		
			
				|  |  |      apiVersion: String!
 | 
	
		
			
				|  |  |      hostname: String!
 | 
	
		
			
				|  |  |      type: String!
 | 
	
	
		
			
				|  | @@ -44,15 +44,15 @@ const typeDefs = `
 | 
	
		
			
				|  |  |      cpus: [ CPU! ]!
 | 
	
		
			
				|  |  |      networkInterfaces: [ NetworkInterface ]!
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  | -  
 | 
	
		
			
				|  |  | -  extend type Mutation {
 | 
	
		
			
				|  |  | -    hello: String!
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  extend type Query {
 | 
	
		
			
				|  |  | +    system: System!
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |    `
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -const resolvers = {
 | 
	
		
			
				|  |  | -  Query: {
 | 
	
		
			
				|  |  | -    apiVersion: (_) => '0.1',
 | 
	
		
			
				|  |  | +function system () {
 | 
	
		
			
				|  |  | +  return {
 | 
	
		
			
				|  |  | +    apiVersion: '0.1',
 | 
	
		
			
				|  |  |      hostname: os.hostname,
 | 
	
		
			
				|  |  |      type: os.type,
 | 
	
		
			
				|  |  |      platform: os.platform,
 | 
	
	
		
			
				|  | @@ -63,7 +63,7 @@ const resolvers = {
 | 
	
		
			
				|  |  |      totalmem: os.totalmem,
 | 
	
		
			
				|  |  |      freemem: os.freemem,
 | 
	
		
			
				|  |  |      cpus: os.cpus,
 | 
	
		
			
				|  |  | -    networkInterfaces: (_) => {
 | 
	
		
			
				|  |  | +    networkInterfaces: () => {
 | 
	
		
			
				|  |  |        const interfaces = os.networkInterfaces()
 | 
	
		
			
				|  |  |        const ifaceArray = []
 | 
	
		
			
				|  |  |        for (let key in interfaces) {
 | 
	
	
		
			
				|  | @@ -77,4 +77,10 @@ const resolvers = {
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +const resolvers = {
 | 
	
		
			
				|  |  | +  Query: {
 | 
	
		
			
				|  |  | +    system
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  module.exports = { typeDefs, resolvers }
 |