-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverBuild.js
1 lines (1 loc) · 3.01 KB
/
serverBuild.js
1
module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t){e.exports=require("express")},function(e,t){e.exports=require("morgan")},function(e,t){e.exports=require("cors")},function(e,t){e.exports=require("express-graphql")},function(e,t,r){e.exports=r(5)},function(e,t,r){"use strict";r.r(t),function(e){var t=r(0),n=r.n(t),i=(r(6),r(1)),o=r.n(i),u=r(2),a=r.n(u),c=r(3),p=r.n(c),l=r(7),s=n()();s.use(o()()),s.use(a()()),s.use("/graphql",p()({schema:l,graphiql:!0})),s.use(n.a.static("build")),s.get("*",function(t,r){r.sendFile("index.html",{root:e})}),s.listen(3e3,function(){return console.log("Server Started 3000")})}.call(this,"/")},function(e,t){e.exports=require("path")},function(e,t,r){var n=r(8),i=r(9),o=r(10),u=o.faculty,a=o.publications,c=n.GraphQLObjectType,p=n.GraphQLInt,l=n.GraphQLID,s=n.GraphQLString,f=n.GraphQLList,d=n.GraphQLSchema,m=new c({name:"Faculty",fields:function(){return{id:{type:l},name:{type:s},department:{type:s},contact:{type:p},publication:{type:new f(y),resolve:function(e,t){return console.log(e),i.filter(a,{facultyID:e.id})}}}}}),y=new c({name:"Publications",fields:function(){return{id:{type:l},paperPublished:{type:s},publishedDate:{type:s},facultyID:{type:l}}}}),h=new c({name:"RootQueryType",fields:{faculty:{type:m,args:{id:{type:l}},resolve:function(e,t){return i.find(u,{id:t.id})}},publications:{type:y,args:{id:{type:l}},resolve:function(e,t){return i.find(a,{facultyID:t.id})}}}});e.exports=new d({query:h})},function(e,t){e.exports=require("graphql")},function(e,t){e.exports=require("lodash")},function(e){e.exports={faculty:[{id:"1",name:"Dr. Shishir Kumar",department:"Computer Science",contact:123},{id:"13",name:"Mr. Nilesh Patel",department:"Computer Science",contact:1234},{id:"15",name:"Mr. Amit Kumar Srivastava",department:"Computer Science",contact:122},{id:"55",name:"Dr. Mahesh Kumar",department:"Computer Science",contact:1213},{id:"21",name:"Dr. Amit Kumar",department:"Computer Science",contact:1323}],publications:[{id:"pub1",paperPublished:"Research on Load Balancing",publishedDate:"23/10/2015",facultyID:"1"},{id:"pub3",paperPublished:"Research on Compiler Top-Down Parsing",publishedDate:"02/01/2017",facultyID:"1"}]}}]);