New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@graphql-codegen/client-preset

Package Overview
Dependencies
Maintainers
4
Versions
2132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-codegen/client-preset - npm Package Compare versions

Comparing version 4.6.3-alpha-20250219120338-60a8d805e39fc93569fe6e3d1d1bfd6df2bc1641 to 4.6.3-alpha-20250219142655-325d6c9ee35a514b43d3a15c097858a5b77e4a1c

10

cjs/persisted-documents.js

@@ -9,2 +9,4 @@ "use strict";

const graphql_1 = require("graphql");
const CLIENT_DIRECTIVE_NAME = 'client';
const CONNECTION_DIRECTIVE_NAME = 'connection';
/**

@@ -34,3 +36,3 @@ * This function generates a hash from a document node.

[graphql_1.Kind.FIELD](field) {
if (field.directives?.some(directive => directive.name.value === 'client')) {
if (field.directives?.some(directive => directive.name.value === CLIENT_DIRECTIVE_NAME)) {
return null;

@@ -40,3 +42,3 @@ }

[graphql_1.Kind.FRAGMENT_SPREAD](spread) {
if (spread.directives?.some(directive => directive.name.value === 'client')) {
if (spread.directives?.some(directive => directive.name.value === CLIENT_DIRECTIVE_NAME)) {
return null;

@@ -46,3 +48,3 @@ }

[graphql_1.Kind.INLINE_FRAGMENT](fragment) {
if (fragment.directives?.some(directive => directive.name.value === 'client')) {
if (fragment.directives?.some(directive => directive.name.value === CLIENT_DIRECTIVE_NAME)) {
return null;

@@ -52,3 +54,3 @@ }

[graphql_1.Kind.DIRECTIVE](directive) {
if (directive.name.value === 'connection') {
if (directive.name.value === CONNECTION_DIRECTIVE_NAME) {
return null;

@@ -55,0 +57,0 @@ }

import { printExecutableGraphQLDocument } from '@graphql-tools/documents';
import * as crypto from 'crypto';
import { Kind, visit } from 'graphql';
const CLIENT_DIRECTIVE_NAME = 'client';
const CONNECTION_DIRECTIVE_NAME = 'connection';
/**

@@ -28,3 +30,3 @@ * This function generates a hash from a document node.

[Kind.FIELD](field) {
if (field.directives?.some(directive => directive.name.value === 'client')) {
if (field.directives?.some(directive => directive.name.value === CLIENT_DIRECTIVE_NAME)) {
return null;

@@ -34,3 +36,3 @@ }

[Kind.FRAGMENT_SPREAD](spread) {
if (spread.directives?.some(directive => directive.name.value === 'client')) {
if (spread.directives?.some(directive => directive.name.value === CLIENT_DIRECTIVE_NAME)) {
return null;

@@ -40,3 +42,3 @@ }

[Kind.INLINE_FRAGMENT](fragment) {
if (fragment.directives?.some(directive => directive.name.value === 'client')) {
if (fragment.directives?.some(directive => directive.name.value === CLIENT_DIRECTIVE_NAME)) {
return null;

@@ -46,3 +48,3 @@ }

[Kind.DIRECTIVE](directive) {
if (directive.name.value === 'connection') {
if (directive.name.value === CONNECTION_DIRECTIVE_NAME) {
return null;

@@ -49,0 +51,0 @@ }

12

package.json
{
"name": "@graphql-codegen/client-preset",
"version": "4.6.3-alpha-20250219120338-60a8d805e39fc93569fe6e3d1d1bfd6df2bc1641",
"version": "4.6.3-alpha-20250219142655-325d6c9ee35a514b43d3a15c097858a5b77e4a1c",
"description": "GraphQL Code Generator preset for client.",

@@ -12,8 +12,8 @@ "peerDependencies": {

"@graphql-codegen/add": "^5.0.3",
"@graphql-codegen/typed-document-node": "5.0.14-alpha-20250219120338-60a8d805e39fc93569fe6e3d1d1bfd6df2bc1641",
"@graphql-codegen/typescript": "4.1.4-alpha-20250219120338-60a8d805e39fc93569fe6e3d1d1bfd6df2bc1641",
"@graphql-codegen/typescript-operations": "4.5.0-alpha-20250219120338-60a8d805e39fc93569fe6e3d1d1bfd6df2bc1641",
"@graphql-codegen/gql-tag-operations": "4.0.15-alpha-20250219120338-60a8d805e39fc93569fe6e3d1d1bfd6df2bc1641",
"@graphql-codegen/typed-document-node": "5.0.14-alpha-20250219142655-325d6c9ee35a514b43d3a15c097858a5b77e4a1c",
"@graphql-codegen/typescript": "4.1.4-alpha-20250219142655-325d6c9ee35a514b43d3a15c097858a5b77e4a1c",
"@graphql-codegen/typescript-operations": "4.5.0-alpha-20250219142655-325d6c9ee35a514b43d3a15c097858a5b77e4a1c",
"@graphql-codegen/gql-tag-operations": "4.0.15-alpha-20250219142655-325d6c9ee35a514b43d3a15c097858a5b77e4a1c",
"@graphql-codegen/plugin-helpers": "^5.1.0",
"@graphql-codegen/visitor-plugin-common": "5.7.0-alpha-20250219120338-60a8d805e39fc93569fe6e3d1d1bfd6df2bc1641",
"@graphql-codegen/visitor-plugin-common": "5.7.0-alpha-20250219142655-325d6c9ee35a514b43d3a15c097858a5b77e4a1c",
"@graphql-typed-document-node/core": "3.2.0",

@@ -20,0 +20,0 @@ "@graphql-tools/documents": "^1.0.0",

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