File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed
packages/graphql-codegen-golang Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ projects:
99 hooks :
1010 afterOneFileWrite : go fmt
1111 plugins :
12- - packages/graphql-codegen-golang/dist/index.js
12+ - packages/graphql-codegen-golang/dist/index.js :
13+ generateHTTPClient : false
1314 rickandmorty :
1415 schema : https://rickandmortyapi.com/graphql/
1516 documents : examples/rickandmorty/document.graphql
@@ -22,4 +23,3 @@ projects:
2223 plugins :
2324 - packages/graphql-codegen-golang/dist/index.js :
2425 packageName : rickandmorty
25- generateHTTPClient : true
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ generates:
3838 plugins :
3939 - graphql-codegen-golang :
4040 packageName : graphql # default
41- generateHTTPClient : false # default
41+ generateHTTPClient : true # default
4242` ` `
4343
4444See [` graphql.config.yaml`](/graphql.config.yaml) for more.
@@ -50,4 +50,4 @@ Configuration source is at [src/config.ts](src/config.ts)
5050| Name | Type | Default | Description |
5151| ------------------ | ------- | ------- | ------------------------------------------ |
5252| packageName | string | graphql | Name of the generated Golang package. |
53- | generateHTTPClient | boolean | false | Should an GraphQL HTTP client be generated |
53+ | generateHTTPClient | boolean | true | Should an GraphQL HTTP client be generated |
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export interface IGolangPluginConfig {
1515
1616 /**
1717 * Define if an HTTP client should be generated
18- * @default false
18+ * @default true
1919 */
2020 generateHTTPClient ?: boolean
2121}
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ export class GolangGenerator {
6262
6363 public constructor ( schema : GraphQLSchema , config ?: IGolangPluginConfig ) {
6464 this . config = config ?? { }
65+ this . config . generateHTTPClient ??= true
6566 this . schema = schema
6667 this . _templateEngine = new Liquid ( {
6768 strictFilters : true ,
You can’t perform that action at this time.
0 commit comments