Skip to content

Commit 05c4cfd

Browse files
committed
upgrade to 1.3.5
1 parent 0dd8982 commit 05c4cfd

File tree

2 files changed

+38
-38
lines changed

2 files changed

+38
-38
lines changed

README.md

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,24 @@ npm install -D ts-gql-plugin
2323

2424
Then add plugin to your `tsconfig.json`
2525

26-
```json5
26+
```jsonc
2727
{
28-
compilerOptions: {
29-
plugins: [
28+
"compilerOptions": {
29+
"plugins": [
3030
{
31-
name: 'ts-gql-plugin',
32-
},
33-
],
34-
},
31+
"name": "ts-gql-plugin"
32+
}
33+
]
34+
}
3535
}
3636
```
3737

3838
Since this plugin use [graphql-config](https://www.graphql-config.com/docs/user/user-introduction) you should add a config file targeting your GraphQL schema.
3939

40-
```json5
40+
```jsonc
4141
// .graphqlrc
4242
{
43-
schema: './schema.graphql',
43+
"schema": "./schema.graphql"
4444
}
4545
```
4646

@@ -97,20 +97,20 @@ Configuration can be done at 2 levels: in tsconfig.json and in graphql-config fi
9797

9898
You can add project-related configuration using extension `"ts-gql"`.
9999

100-
```json5
100+
```jsonc
101101
// .graphqlrc
102102
{
103-
schema: './schema.graphql',
104-
extensions: {
105-
'ts-gql': {
106-
codegenConfig: {
107-
defaultScalarType: 'unknown',
108-
scalars: {
109-
DateTime: 'String',
110-
},
111-
},
112-
},
113-
},
103+
"schema": "./schema.graphql",
104+
"extensions": {
105+
"ts-gql": {
106+
"codegenConfig": {
107+
"defaultScalarType": "unknown",
108+
"scalars": {
109+
"DateTime": "String"
110+
}
111+
}
112+
}
113+
}
114114
}
115115
```
116116

@@ -124,17 +124,17 @@ You can add project-related configuration using extension `"ts-gql"`.
124124

125125
If you should handle multiple GraphQL projects (= multiple schemas), define projects into your graphql-config file.
126126

127-
```json5
127+
```jsonc
128128
// .graphqlrc
129129
{
130-
projects: {
131-
Catalog: {
132-
schema: './catalog/schema.graphql',
130+
"projects": {
131+
"Catalog": {
132+
"schema": "./catalog/schema.graphql"
133133
},
134-
Channel: {
135-
schema: './channel/schema.graphql',
136-
},
137-
},
134+
"Channel": {
135+
"schema": "./channel/schema.graphql"
136+
}
137+
}
138138
}
139139
```
140140

@@ -143,16 +143,16 @@ If you should handle multiple GraphQL projects (= multiple schemas), define proj
143143
Then into your plugin config define project name regex, following your own constraints.
144144
This regex is used to extract project name from operations.
145145

146-
```json5
146+
```jsonc
147147
{
148-
compilerOptions: {
149-
plugins: [
148+
"compilerOptions": {
149+
"plugins": [
150150
{
151-
name: 'ts-gql-plugin',
152-
projectNameRegex: '([A-Z][a-z]*)',
153-
},
154-
],
155-
},
151+
"name": "ts-gql-plugin",
152+
"projectNameRegex": "([A-Z][a-z]*)"
153+
}
154+
]
155+
}
156156
}
157157
```
158158

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ts-gql-plugin",
3-
"version": "1.3.4",
3+
"version": "1.3.5",
44
"packageManager": "[email protected]",
55
"license": "MIT",
66
"main": "./dist/plugin.js",

0 commit comments

Comments
 (0)