@manuelp1345/graph-generator 1.0.3 → 1.1.3
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/dist/codegen.js +29 -0
- package/package.json +2 -2
- /package/{codegen.ts → src/codegen.ts} +0 -0
package/dist/codegen.js
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
import dotenv from "dotenv";
|
2
|
+
dotenv.config({ path: "./.env" });
|
3
|
+
const schema = process.env.SCHEMA_URL || "http://localhost:4000/graphql";
|
4
|
+
console.log("using schema", schema);
|
5
|
+
const config = {
|
6
|
+
overwrite: true,
|
7
|
+
schema: schema,
|
8
|
+
documents: ["./src/**/*.graphql"],
|
9
|
+
ignoreNoDocuments: true,
|
10
|
+
generates: {
|
11
|
+
"./src/generated.tsx": {
|
12
|
+
plugins: [
|
13
|
+
"typescript",
|
14
|
+
"typescript-operations",
|
15
|
+
"typescript-react-apollo",
|
16
|
+
],
|
17
|
+
config: {
|
18
|
+
withHooks: true,
|
19
|
+
withHOC: false,
|
20
|
+
withComponent: false,
|
21
|
+
namingConvention: {
|
22
|
+
typeNames: "change-case#pascalCase",
|
23
|
+
enumValues: "change-case#upperCase",
|
24
|
+
},
|
25
|
+
},
|
26
|
+
},
|
27
|
+
},
|
28
|
+
};
|
29
|
+
export default config;
|
package/package.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "@manuelp1345/graph-generator",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.1.3",
|
4
4
|
"description": "generador de schema y types de graphql",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"scripts": {
|
7
|
-
"codegen": "graphql-codegen --config codegen.
|
7
|
+
"codegen": "graphql-codegen --config dist/codegen.js",
|
8
8
|
"build": "tsc",
|
9
9
|
"prepublishOnly": "npm run codegen && npm run build"
|
10
10
|
},
|
File without changes
|