Skip to content

Commit 9c1fc01

Browse files
author
Alex Stanciu
committed
first
0 parents  commit 9c1fc01

File tree

9 files changed

+645
-0
lines changed

9 files changed

+645
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

package-lock.json

Lines changed: 316 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "graphql-prezo",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"keywords": [],
10+
"author": "Alex <[email protected]>",
11+
"license": "MIT",
12+
"dependencies": {
13+
"apollo-server-express": "1.0.2",
14+
"body-parser": "1.17.2",
15+
"express": "4.15.3",
16+
"graphql": "0.10.5",
17+
"graphql-tools": "1.1.0"
18+
}
19+
}

schema.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Starting Schema
2+
const makeExecutableSchema = require('graphql-tools').makeExecutableSchema;
3+
4+
const typeDefs = `
5+
type Query {
6+
serverStatus: String,
7+
}
8+
`;
9+
10+
const resolvers = {
11+
Query: {
12+
serverStatus: (root, args, context) => {
13+
return 'OK';
14+
}
15+
}
16+
};
17+
18+
19+
module.exports = makeExecutableSchema({
20+
typeDefs,
21+
resolvers,
22+
});

0 commit comments

Comments
 (0)