Skip to content

Commit

Permalink
upgrade to 1.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Chnapy committed Aug 25, 2022
1 parent 0dd8982 commit 05c4cfd
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 38 deletions.
74 changes: 37 additions & 37 deletions README.md
Expand Up @@ -23,24 +23,24 @@ npm install -D ts-gql-plugin

Then add plugin to your `tsconfig.json`

```json5
```jsonc
{
compilerOptions: {
plugins: [
"compilerOptions": {
"plugins": [
{
name: 'ts-gql-plugin',
},
],
},
"name": "ts-gql-plugin"
}
]
}
}
```

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.

```json5
```jsonc
// .graphqlrc
{
schema: './schema.graphql',
"schema": "./schema.graphql"
}
```

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

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

```json5
```jsonc
// .graphqlrc
{
schema: './schema.graphql',
extensions: {
'ts-gql': {
codegenConfig: {
defaultScalarType: 'unknown',
scalars: {
DateTime: 'String',
},
},
},
},
"schema": "./schema.graphql",
"extensions": {
"ts-gql": {
"codegenConfig": {
"defaultScalarType": "unknown",
"scalars": {
"DateTime": "String"
}
}
}
}
}
```

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

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

```json5
```jsonc
// .graphqlrc
{
projects: {
Catalog: {
schema: './catalog/schema.graphql',
"projects": {
"Catalog": {
"schema": "./catalog/schema.graphql"
},
Channel: {
schema: './channel/schema.graphql',
},
},
"Channel": {
"schema": "./channel/schema.graphql"
}
}
}
```

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

```json5
```jsonc
{
compilerOptions: {
plugins: [
"compilerOptions": {
"plugins": [
{
name: 'ts-gql-plugin',
projectNameRegex: '([A-Z][a-z]*)',
},
],
},
"name": "ts-gql-plugin",
"projectNameRegex": "([A-Z][a-z]*)"
}
]
}
}
```

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "ts-gql-plugin",
"version": "1.3.4",
"version": "1.3.5",
"packageManager": "yarn@3.2.1",
"license": "MIT",
"main": "./dist/plugin.js",
Expand Down

1 comment on commit 05c4cfd

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"with ts-gql-plugin" vs "without ts-gql-plugin" Benchmark

Benchmark suite Current: 05c4cfd Previous: 0dd8982 Ratio
performance impact %: "with ts-gql-plugin" vs "without ts-gql-plugin" 23.01 % (±6.90%) 22.97 % (±1.35%) 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.