Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@acrool/graphql-codegen-rtk-query

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@acrool/graphql-codegen-rtk-query - npm Package Compare versions

Comparing version 0.0.3-test.3 to 0.0.3-test.4

1

dist/visitor.d.ts

@@ -10,2 +10,3 @@ import { GraphQLSchema, OperationDefinitionNode } from 'graphql';

private _hooks;
private _subscription;
constructor(schema: GraphQLSchema, fragments: LoadedFragment[], rawConfig: RTKQueryRawPluginConfig, documents: Types.DocumentFile[]);

@@ -12,0 +13,0 @@ get imports(): Set<string>;

11

dist/visitor.js

@@ -23,2 +23,3 @@ "use strict";

this._hooks = [];
this._subscription = [];
this._externalImportPrefix = this.config.importOperationTypesFrom

@@ -44,2 +45,3 @@ ? `${this.config.importOperationTypesFrom}.`

`import { ${this.config.importBaseApiAlternateName} } from '${this.config.importBaseApiFrom}';`,
'import {gql, useSubscription, SubscriptionHookOptions} from \'@apollo/client\';',
];

@@ -65,2 +67,6 @@ }

: '') +
'\n\n' +
(this.config.exportHooks
? `${this._subscription.join(', ')}`
: '') +
'\n\n');

@@ -97,3 +103,2 @@ }

const operationName = (_a = node.name) === null || _a === void 0 ? void 0 : _a.value;
const query = [];
if (!operationName)

@@ -109,4 +114,4 @@ return '';

if (operationType === 'Subscription') {
query.push(this.generateSubscriptionHook(node, documentVariableName, operationName, operationResultType, operationVariablesTypes, hasRequiredVariables));
return query.join('\n');
this._subscription.push(this.generateSubscriptionHook(node, documentVariableName, operationName, operationResultType, operationVariablesTypes, hasRequiredVariables));
return '';
}

@@ -113,0 +118,0 @@ const Generics = `${operationResultType}, IUseFetcherArgs<${operationVariablesTypes}>${hasRequiredVariables ? '' : ' | void'}`;

{
"name": "@acrool/graphql-codegen-rtk-query",
"version": "0.0.3-test.3",
"version": "0.0.3-test.4",
"description": "trk-query for graphql-code-generator",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc