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

@pothos/plugin-relay

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pothos/plugin-relay - npm Package Compare versions

Comparing version 3.13.0 to 3.14.0

6

CHANGELOG.md
# Change Log
## 3.14.0
### Minor Changes
- e79b3ce5: Pass node list to toCursor option of resolveCursorConnection
## 3.13.0

@@ -4,0 +10,0 @@

2

dts/utils/connections.d.ts

@@ -12,3 +12,3 @@ import { MaybePromise, SchemaTypes } from '@pothos/core';

maxSize?: number;
toCursor: (value: T) => string;
toCursor: (value: T, nodes: T[]) => string;
}

@@ -15,0 +15,0 @@ export interface ResolveCursorConnectionArgs {

@@ -128,4 +128,4 @@ import SchemaBuilder, { createContextCache, getTypeBrand, ObjectRef, verifyRef } from '@pothos/core';

if (proto === null || proto === void 0 ? void 0 : proto.constructor) {
const config = this.configStore.getTypeConfig(proto.constructor);
return config.name === nodeName;
const config1 = this.configStore.getTypeConfig(proto.constructor);
return config1.name === nodeName;
}

@@ -156,7 +156,7 @@ }

schemaBuilderProto.globalConnectionField = function globalConnectionField(name, field) {
var ref1;
var ref;
const onRef = (ref) => {
this.objectField(ref, name, field);
};
(ref1 = connectionRefs.get(this)) === null || ref1 === void 0 ? void 0 : ref1.forEach((ref) => void onRef(ref));
(ref = connectionRefs.get(this)) === null || ref === void 0 ? void 0 : ref.forEach((ref) => void onRef(ref));
if (!globalConnectionFieldsMap.has(this)) {

@@ -168,7 +168,7 @@ globalConnectionFieldsMap.set(this, []);

schemaBuilderProto.globalConnectionFields = function globalConnectionFields(fields) {
var ref2;
var ref;
const onRef = (ref) => {
this.objectFields(ref, fields);
};
(ref2 = connectionRefs.get(this)) === null || ref2 === void 0 ? void 0 : ref2.forEach((ref) => void onRef(ref));
(ref = connectionRefs.get(this)) === null || ref === void 0 ? void 0 : ref.forEach((ref) => void onRef(ref));
if (!globalConnectionFieldsMap.has(this)) {

@@ -175,0 +175,0 @@ globalConnectionFieldsMap.set(this, []);

@@ -141,3 +141,3 @@ const OFFSET_CURSOR_PREFIX = "OffsetConnection:";

const edges = trimmed.map((value) => value == null ? null : {
cursor: options.toCursor(value),
cursor: options.toCursor(value, trimmed),
node: value

@@ -144,0 +144,0 @@ });

@@ -174,4 +174,4 @@ "use strict";

if (proto === null || proto === void 0 ? void 0 : proto.constructor) {
const config = this.configStore.getTypeConfig(proto.constructor);
return config.name === nodeName;
const config1 = this.configStore.getTypeConfig(proto.constructor);
return config1.name === nodeName;
}

@@ -201,7 +201,7 @@ } catch {

schemaBuilderProto.globalConnectionField = function globalConnectionField(name, field) {
var ref1;
var ref;
const onRef = (ref)=>{
this.objectField(ref, name, field);
};
(ref1 = connectionRefs.get(this)) === null || ref1 === void 0 ? void 0 : ref1.forEach((ref)=>void onRef(ref));
(ref = connectionRefs.get(this)) === null || ref === void 0 ? void 0 : ref.forEach((ref)=>void onRef(ref));
if (!globalConnectionFieldsMap.has(this)) {

@@ -213,7 +213,7 @@ globalConnectionFieldsMap.set(this, []);

schemaBuilderProto.globalConnectionFields = function globalConnectionFields(fields) {
var ref2;
var ref;
const onRef = (ref)=>{
this.objectFields(ref, fields);
};
(ref2 = connectionRefs.get(this)) === null || ref2 === void 0 ? void 0 : ref2.forEach((ref)=>void onRef(ref));
(ref = connectionRefs.get(this)) === null || ref === void 0 ? void 0 : ref.forEach((ref)=>void onRef(ref));
if (!globalConnectionFieldsMap.has(this)) {

@@ -220,0 +220,0 @@ globalConnectionFieldsMap.set(this, []);

@@ -150,3 +150,3 @@ "use strict";

const edges = trimmed.map((value)=>value == null ? null : {
cursor: options.toCursor(value),
cursor: options.toCursor(value, trimmed),
node: value

@@ -153,0 +153,0 @@ });

{
"name": "@pothos/plugin-relay",
"version": "3.13.0",
"version": "3.14.0",
"description": "A Pothos plugin for adding relay style connections, nodes, and cursor based pagination to your GraphQL schema",

@@ -41,3 +41,3 @@ "main": "./lib/index.js",

"@pothos/core": "3.12.0",
"@pothos/test-utils": "1.2.2",
"@pothos/test-utils": "1.2.3",
"graphql": "16.5.0",

@@ -44,0 +44,0 @@ "graphql-subscriptions": "^2.0.0",

@@ -14,3 +14,3 @@ import { MaybePromise, SchemaTypes } from '@pothos/core';

maxSize?: number;
toCursor: (value: T) => string;
toCursor: (value: T, nodes: T[]) => string;
}

@@ -236,3 +236,3 @@

: {
cursor: options.toCursor(value),
cursor: options.toCursor(value, trimmed),
node: value,

@@ -239,0 +239,0 @@ },

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

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