@toptal/davinci-graphql-codegen 0.2.12 → 0.2.14
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/CHANGELOG.md +17 -0
- package/README.md +4 -4
- package/dist-package/package.json +3 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @toptal/davinci-graphql-codegen
|
|
2
2
|
|
|
3
|
+
## 0.2.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`9b67beb3`](https://github.com/toptal/davinci/commit/9b67beb3aaf0e24193b2deaba3126c41e3ec9280), [`04fe7ffa`](https://github.com/toptal/davinci/commit/04fe7ffa161027d081c6ae870716bb06a2fcf73f)]:
|
|
8
|
+
- @toptal/davinci-cli-shared@1.7.0
|
|
9
|
+
- @toptal/davinci-monorepo@6.6.6
|
|
10
|
+
|
|
11
|
+
## 0.2.13
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#1541](https://github.com/toptal/davinci/pull/1541) [`397a53c9`](https://github.com/toptal/davinci/commit/397a53c9add9f7e8d485648b51cd22676d97c78f) Thanks [@TomasSlama](https://github.com/TomasSlama)! - ---
|
|
16
|
+
- Update documentation about prefering individual davinci packages usage
|
|
17
|
+
- Updated dependencies [[`397a53c9`](https://github.com/toptal/davinci/commit/397a53c9add9f7e8d485648b51cd22676d97c78f)]:
|
|
18
|
+
- @toptal/davinci-monorepo@6.6.5
|
|
19
|
+
|
|
3
20
|
## 0.2.12
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ _<sup>1</sup> *This structure might be subject to change in a future iteration o
|
|
|
41
41
|
After creating the package and applying the default configurations you should add Davinci as a dependency of `@toptal/modularity-template-graphql` (it's how we name this package within our monorepo to resolve to `libs/graphql`) and add this `script` to your `package.json`:
|
|
42
42
|
|
|
43
43
|
```
|
|
44
|
-
"generate-schema": "davinci
|
|
44
|
+
"generate-schema": "davinci-graphql-codegen generate-schema"
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
When you run the above command, it will iterate over the `schemas` you have configured in your `codegen.json` and then create those schemas locally for you to commit to your repo, and then make use of them for generating operation types.
|
|
@@ -51,7 +51,7 @@ When you run the above command, it will iterate over the `schemas` you have conf
|
|
|
51
51
|
In order to generate operation types for your GraphQL Gateway, you'd need to add this `script` to your `package.json`.
|
|
52
52
|
|
|
53
53
|
```
|
|
54
|
-
"generate-operations": "davinci
|
|
54
|
+
"generate-operations": "davinci-graphql-codegen generate-operations"
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
Then create a `codegen.json` file at the root folder of your package that contains the following data/structure:
|
|
@@ -76,7 +76,7 @@ GraphQL Codegen is an extensible and configurable tool that gives you the abilit
|
|
|
76
76
|
You can customize the `codegen.json` file that GraphQL Codegen is going to look for. You can do so via CLI with the following command:
|
|
77
77
|
|
|
78
78
|
```
|
|
79
|
-
yarn davinci
|
|
79
|
+
yarn davinci-graphql-codegen generate-schema --config=./graphql/codegen-schema.json
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
The above script will search for `codegen-schema.json` within `./graphql`.
|
|
@@ -86,7 +86,7 @@ The above script will search for `codegen-schema.json` within `./graphql`.
|
|
|
86
86
|
When generating operations, we have set a default setting that generates your operation types within a file named the same as where your query or mutation is and it will have the `.ts` extension. This is due to that the default extension for your queries or mutations should be `.graphql`. But you might have your query within a `.ts` file that comes with, for instance, a hook that makes use of this query, and if you'd run GraphQL Codegen Operations as is, you'll have that `.ts` file ovewriten. But you can avoid this conflict via CLI with the following command:
|
|
87
87
|
|
|
88
88
|
```
|
|
89
|
-
davinci
|
|
89
|
+
davinci-graphql-codegen generate-operations --extension=.types.ts
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
The above script will tell GraphQL Codegen that when generating operations, you'd like it to generate your types with the `.types.ts` extension so it won't conflict with your already existing `.ts` file which contains more than your query or mutation.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toptal/davinci-graphql-codegen",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "Codegen",
|
|
5
5
|
"author": "Toptal",
|
|
6
6
|
"license": "ISC",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"@graphql-codegen/typescript-operations": "^2.3.5",
|
|
30
30
|
"@graphql-codegen/typescript-resolvers": "^2.2.1",
|
|
31
31
|
"@graphql-typed-document-node/core": "^3.1.0",
|
|
32
|
-
"@toptal/davinci-cli-shared": "^1.
|
|
33
|
-
"@toptal/davinci-monorepo": "6.6.
|
|
32
|
+
"@toptal/davinci-cli-shared": "^1.7.0",
|
|
33
|
+
"@toptal/davinci-monorepo": "6.6.6",
|
|
34
34
|
"chalk": "^4.1.2",
|
|
35
35
|
"graphql": "^15.7.1"
|
|
36
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toptal/davinci-graphql-codegen",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "Codegen",
|
|
5
5
|
"author": "Toptal",
|
|
6
6
|
"license": "ISC",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"@graphql-codegen/typescript-operations": "^2.3.5",
|
|
30
30
|
"@graphql-codegen/typescript-resolvers": "^2.2.1",
|
|
31
31
|
"@graphql-typed-document-node/core": "^3.1.0",
|
|
32
|
-
"@toptal/davinci-cli-shared": "^1.
|
|
33
|
-
"@toptal/davinci-monorepo": "6.6.
|
|
32
|
+
"@toptal/davinci-cli-shared": "^1.7.0",
|
|
33
|
+
"@toptal/davinci-monorepo": "6.6.6",
|
|
34
34
|
"chalk": "^4.1.2",
|
|
35
35
|
"graphql": "^15.7.1"
|
|
36
36
|
}
|