@aleleba/create-node-ts-graphql-server 1.0.3 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env.example
CHANGED
package/README.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# Create Node TS GraphQL Server
|
|
2
2
|
|
|
3
|
-
This project aims to have a starter kit for creating a new Node with typescript,
|
|
3
|
+
This project aims to have a starter kit for creating a new Node with typescript, GraphQL server and tools that generally go along with it.
|
|
4
4
|
|
|
5
5
|
Tech(Library or Framework) | Version |
|
|
6
6
|
--- | --- |
|
|
7
7
|
Jest (Testing) | 28.1.0
|
|
8
8
|
Typescript | 4.7.2
|
|
9
|
+
GraphQL | 16.5.0
|
|
9
10
|
|
|
10
11
|
## Setup
|
|
11
12
|
To create a new project run in the terminal:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aleleba/create-node-ts-graphql-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Node with Typescript and GraphQL Server",
|
|
5
5
|
"bin": "./bin/cli.js",
|
|
6
6
|
"main": "index.js",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"dotenv": "^16.0.1",
|
|
40
40
|
"express": "^4.18.1",
|
|
41
41
|
"express-graphql": "^0.12.0",
|
|
42
|
-
"graphql": "^
|
|
42
|
+
"graphql": "^16.5.0",
|
|
43
43
|
"graphql-subscriptions": "^2.0.0",
|
|
44
44
|
"graphql-tools": "^8.2.11",
|
|
45
45
|
"graphql-ws": "^5.8.2",
|
|
46
46
|
"web-push": "^3.5.0",
|
|
47
|
-
"ws": "^8.
|
|
47
|
+
"ws": "^8.7.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@babel/core": "^7.18.2",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"@babel/preset-typescript": "^7.17.12",
|
|
53
53
|
"@babel/register": "^7.17.7",
|
|
54
54
|
"@types/jest": "^27.5.1",
|
|
55
|
-
"@types/node": "^17.0.
|
|
55
|
+
"@types/node": "^17.0.36",
|
|
56
56
|
"@types/webpack": "^5.28.0",
|
|
57
57
|
"@types/webpack-node-externals": "^2.5.3",
|
|
58
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
59
|
-
"@typescript-eslint/parser": "^5.
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
|
59
|
+
"@typescript-eslint/parser": "^5.27.0",
|
|
60
60
|
"babel-loader": "^8.2.5",
|
|
61
61
|
"clean-webpack-plugin": "^4.0.0",
|
|
62
62
|
"compression-webpack-plugin": "^10.0.0",
|
|
@@ -13,10 +13,10 @@ const resolvers = {
|
|
|
13
13
|
testMutation: (rootValue, args, context) => ({}),
|
|
14
14
|
},
|
|
15
15
|
Test: {
|
|
16
|
-
test: (rootValue, args, context) => getTest(rootValue, args, context)
|
|
16
|
+
test: (rootValue, args, context) => getTest({rootValue, args, context})
|
|
17
17
|
},
|
|
18
18
|
TestMutation: {
|
|
19
|
-
testMutation: (rootValue, args, context) => addText(rootValue, args, context)
|
|
19
|
+
testMutation: (rootValue, args, context) => addText({rootValue, args, context})
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
import { getTestModel, addTextModel } from '../../models';
|
|
4
4
|
|
|
5
5
|
// eslint-disable-next-line
|
|
6
|
-
export const getTest = async (rootValue, args, context) => {
|
|
6
|
+
export const getTest = async ({rootValue, args, context}) => {
|
|
7
7
|
return getTestModel();
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
// eslint-disable-next-line
|
|
11
|
-
export const addText = async (rootValue, args, context) => {
|
|
11
|
+
export const addText = async ({rootValue, args, context}) => {
|
|
12
12
|
const text = args.text;
|
|
13
13
|
return addTextModel({ text });
|
|
14
14
|
};
|