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-beta6 to 0.1.0-beta7

5

dist/cache/cache.d.ts

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

export declare const getCacheKeyFromJson: (json: unknown) => Option<symbol>;
export type SchemaConfig = {
interfaceToTypes: Record<string, string[]>;
};
export declare const getCacheKeyFromOperationNode: (operationNode: OperationDefinitionNode) => Option<symbol>;

@@ -11,3 +14,3 @@ export declare class ClientCache {

schemaConfig: Record<string, Set<string>>;
constructor(schemaConfig: Record<string, string[]>);
constructor(schemaConfig: SchemaConfig);
isTypeCompatible(typename: string, typeCondition: string): boolean;

@@ -14,0 +17,0 @@ dump(): Map<symbol, unknown>;

4

dist/client.d.ts
import { DocumentNode } from "@0no-co/graphql.web";
import { Future, Option, Result } from "@swan-io/boxed";
import { ClientCache } from "./cache/cache";
import { ClientCache, SchemaConfig } from "./cache/cache";
import { ClientError } from "./errors";

@@ -19,3 +19,3 @@ import { Connection, Edge, TypedDocumentNode } from "./types";

makeRequest?: MakeRequest;
schemaConfig: Record<string, string[]>;
schemaConfig: SchemaConfig;
};

@@ -22,0 +22,0 @@ type ConnectionUpdate<Node> = [

@@ -101,3 +101,6 @@ 'use strict';

this.schemaConfig = Object.fromEntries(
Object.entries(schemaConfig).map(([key, value]) => [key, new Set(value)])
Object.entries(schemaConfig.interfaceToTypes).map(([key, value]) => [
key,
new Set(value)
])
);

@@ -1257,3 +1260,3 @@ }

var ClientContext = react.createContext(
new Client({ url: "/graphql", schemaConfig: {} })
new Client({ url: "/graphql", schemaConfig: { interfaceToTypes: {} } })
);

@@ -1260,0 +1263,0 @@ var useDeferredQuery = (query, { optimize = false, debounce } = {}) => {

{
"name": "@swan-io/graphql-client",
"version": "0.1.0-beta6",
"version": "0.1.0-beta7",
"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

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