house, power, energy data generators, savers

This commit is contained in:
Eric Hulburd
2016-02-07 15:32:02 -06:00
parent d1e230c6fd
commit 3cb2320300
47 changed files with 246 additions and 89685 deletions

View File

@@ -0,0 +1,27 @@
import {
GraphQLObjectType,
GraphQLSchema
} from 'graphql';
import {nodeField} from './node';
import DB from './../database';
export default function(){
var queryType = new GraphQLObjectType({
name: 'Query',
fields: () => ({
node: nodeField,
viewer: {
type: DB.User.graphql_type,
resolve: (_, args) => {
return DB.User.findOne({where: {username: 'bethany'}});
}
},
}),
});
return new GraphQLSchema({
query: queryType
});
}