@graphql-codegen/typescript-react-query 3.5.12 → 3.5.13-alpha-9d94e917a.0

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.
Files changed (3) hide show
  1. package/index.js +4 -4
  2. package/index.mjs +4 -4
  3. package/package.json +2 -2
package/index.js CHANGED
@@ -466,10 +466,10 @@ class ReactQueryVisitor extends visitorPluginCommon.ClientSideBaseVisitor {
466
466
  if (raw === 'fetch') {
467
467
  return new FetchFetcher(this);
468
468
  }
469
- else if (typeof raw === 'object' && 'endpoint' in raw) {
469
+ if (typeof raw === 'object' && 'endpoint' in raw) {
470
470
  return new HardcodedFetchFetcher(this, raw);
471
471
  }
472
- else if (raw === 'graphql-request') {
472
+ if (raw === 'graphql-request') {
473
473
  return new GraphQLRequestClientFetcher(this);
474
474
  }
475
475
  return new CustomMapperFetcher(this, raw);
@@ -539,7 +539,7 @@ class ReactQueryVisitor extends visitorPluginCommon.ClientSideBaseVisitor {
539
539
  }
540
540
  return query;
541
541
  }
542
- else if (operationType === 'Mutation') {
542
+ if (operationType === 'Mutation') {
543
543
  let query = this.fetcher.generateMutationHook(node, documentVariableName, operationName, operationResultType, operationVariablesTypes, hasRequiredVariables);
544
544
  if (this.config.exposeMutationKeys) {
545
545
  query += generateMutationKeyMaker(node, operationName);
@@ -549,7 +549,7 @@ class ReactQueryVisitor extends visitorPluginCommon.ClientSideBaseVisitor {
549
549
  }
550
550
  return query;
551
551
  }
552
- else if (operationType === 'Subscription') {
552
+ if (operationType === 'Subscription') {
553
553
  // eslint-disable-next-line no-console
554
554
  console.warn(`Plugin "typescript-react-query" does not support GraphQL Subscriptions at the moment! Ignoring "${node.name.value}"...`);
555
555
  }
package/index.mjs CHANGED
@@ -460,10 +460,10 @@ class ReactQueryVisitor extends ClientSideBaseVisitor {
460
460
  if (raw === 'fetch') {
461
461
  return new FetchFetcher(this);
462
462
  }
463
- else if (typeof raw === 'object' && 'endpoint' in raw) {
463
+ if (typeof raw === 'object' && 'endpoint' in raw) {
464
464
  return new HardcodedFetchFetcher(this, raw);
465
465
  }
466
- else if (raw === 'graphql-request') {
466
+ if (raw === 'graphql-request') {
467
467
  return new GraphQLRequestClientFetcher(this);
468
468
  }
469
469
  return new CustomMapperFetcher(this, raw);
@@ -533,7 +533,7 @@ class ReactQueryVisitor extends ClientSideBaseVisitor {
533
533
  }
534
534
  return query;
535
535
  }
536
- else if (operationType === 'Mutation') {
536
+ if (operationType === 'Mutation') {
537
537
  let query = this.fetcher.generateMutationHook(node, documentVariableName, operationName, operationResultType, operationVariablesTypes, hasRequiredVariables);
538
538
  if (this.config.exposeMutationKeys) {
539
539
  query += generateMutationKeyMaker(node, operationName);
@@ -543,7 +543,7 @@ class ReactQueryVisitor extends ClientSideBaseVisitor {
543
543
  }
544
544
  return query;
545
545
  }
546
- else if (operationType === 'Subscription') {
546
+ if (operationType === 'Subscription') {
547
547
  // eslint-disable-next-line no-console
548
548
  console.warn(`Plugin "typescript-react-query" does not support GraphQL Subscriptions at the moment! Ignoring "${node.name.value}"...`);
549
549
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@graphql-codegen/typescript-react-query",
3
- "version": "3.5.12",
3
+ "version": "3.5.13-alpha-9d94e917a.0",
4
4
  "description": "GraphQL Code Generator plugin for generating a ready-to-use React-Query Hooks based on GraphQL operations",
5
5
  "peerDependencies": {
6
6
  "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
7
7
  },
8
8
  "dependencies": {
9
9
  "@graphql-codegen/plugin-helpers": "^2.4.0",
10
- "@graphql-codegen/visitor-plugin-common": "2.8.0",
10
+ "@graphql-codegen/visitor-plugin-common": "2.9.0-alpha-9d94e917a.0",
11
11
  "auto-bind": "~4.0.0",
12
12
  "change-case-all": "1.0.14",
13
13
  "tslib": "~2.4.0"