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

@swan-io/graphql-client

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swan-io/graphql-client - npm Package Compare versions

Comparing version 0.1.0-beta8 to 0.1.0-beta9

1

dist/graphql/ast.d.ts

@@ -62,1 +62,2 @@ import { DocumentNode, FieldNode, OperationDefinitionNode, SelectionSetNode } from "@0no-co/graphql.web";

export declare const addIdIfPreviousSelected: (oldSelectionSet: SelectionSetNode, newSelectionSet: SelectionSetNode) => SelectionSetNode;
export declare const isExcluded: (fieldNode: FieldNode, variables: Record<string, unknown>) => boolean;

@@ -517,2 +517,12 @@ 'use strict';

};
var isExcluded = (fieldNode, variables) => {
if (!boxed.Array.isArray(fieldNode.directives)) {
return false;
}
return fieldNode.directives.some(
(directive) => directive.name.value === "include" && directive.arguments != null && directive.arguments.some((arg) => {
return arg.name.value === "if" && extractValue(arg.value, variables) === false;
})
);
};

@@ -537,2 +547,3 @@ // src/cache/read.ts

var STABILITY_CACHE = /* @__PURE__ */ new WeakMap();
var EXCLUDED = Symbol.for("EXCLUDED");
var readOperationFromCache = (cache, document, variables) => {

@@ -555,3 +566,10 @@ const traverse = (selections, data) => {

if (!cacheHasKey) {
return boxed.Option.None();
if (isExcluded(fieldNode, variables)) {
return boxed.Option.Some({
...data3,
[originalFieldName]: EXCLUDED
});
} else {
return boxed.Option.None();
}
}

@@ -558,0 +576,0 @@ const valueOrKeyFromCache = (

2

package.json
{
"name": "@swan-io/graphql-client",
"version": "0.1.0-beta8",
"version": "0.1.0-beta9",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "A simple, typesafe GraphQL client for React",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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