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 4.0.0-next.0 to 4.0.0-next.1

8

CHANGELOG.md
# Change Log
## 4.0.0-next.1
### Patch Changes
- update readmes
- Updated dependencies
- @pothos/core@4.0.0-next.1
## 4.0.0-next.0

@@ -4,0 +12,0 @@

8

esm/index.js

@@ -42,4 +42,4 @@ import './global-types.js';

v3: (options) => {
var _options_relayOptions, _options_relayOptions1, _options_relayOptions2, _options_relayOptions3, _options_relayOptions4, _options_relayOptions5, _options_relayOptions_edgesFieldOptions;
var _options_relayOptions_clientMutationId, _options_relayOptions_cursorType, _options_relayOptions_edgeCursorType, _ref, _options_relayOptions_pageInfoCursorType, _ref1, _options_relayOptions_edgesFieldOptions_nullable, _options_relayOptions_brandLoadedObjects;
var _options_relayOptions, _options_relayOptions1, _options_relayOptions2, _options_relayOptions3, _options_relayOptions4, _options_relayOptions5, _options_relayOptions_edgesFieldOptions, _options_relayOptions_nodeFieldOptions;
var _options_relayOptions_clientMutationId, _options_relayOptions_cursorType, _options_relayOptions_edgeCursorType, _ref, _options_relayOptions_pageInfoCursorType, _ref1, _options_relayOptions_edgesFieldOptions_nullable, _options_relayOptions_nodeFieldOptions_nullable, _options_relayOptions_brandLoadedObjects;
return {

@@ -60,2 +60,6 @@ relayOptions: undefined,

},
nodeFieldOptions: {
...options.relayOptions.nodeFieldOptions,
nullable: (_options_relayOptions_nodeFieldOptions_nullable = (_options_relayOptions_nodeFieldOptions = options.relayOptions.nodeFieldOptions) === null || _options_relayOptions_nodeFieldOptions === void 0 ? void 0 : _options_relayOptions_nodeFieldOptions.nullable) !== null && _options_relayOptions_nodeFieldOptions_nullable !== void 0 ? _options_relayOptions_nodeFieldOptions_nullable : false
},
brandLoadedObjects: (_options_relayOptions_brandLoadedObjects = options.relayOptions.brandLoadedObjects) !== null && _options_relayOptions_brandLoadedObjects !== void 0 ? _options_relayOptions_brandLoadedObjects : false

@@ -62,0 +66,0 @@ }

@@ -324,3 +324,3 @@ import { defaultTypeResolver } from 'graphql';

items: true,
list: true
list: this.defaultFieldNullability
}, ...edgesFieldOptions } = {}, pageInfoFieldOptions = {} } = (_this_options_relay2 = this.options.relay) !== null && _this_options_relay2 !== void 0 ? _this_options_relay2 : {};

@@ -347,3 +347,3 @@ const connectionRef = this.objectRef(connectionName);

var _this_options_relay_nodeFieldOptions, _this_options_relay;
var _ref, _ref1;
var _ref;
return {

@@ -373,3 +373,3 @@ pageInfo: t.field({

list: edgeListNullable,
items: (_ref1 = (_ref = edgeItemsNullable !== null && edgeItemsNullable !== void 0 ? edgeItemsNullable : nodeNullable) !== null && _ref !== void 0 ? _ref : (_this_options_relay = this.options.relay) === null || _this_options_relay === void 0 ? void 0 : (_this_options_relay_nodeFieldOptions = _this_options_relay.nodeFieldOptions) === null || _this_options_relay_nodeFieldOptions === void 0 ? void 0 : _this_options_relay_nodeFieldOptions.nullable) !== null && _ref1 !== void 0 ? _ref1 : true
items: edgeItemsNullable || ((_ref = nodeNullable !== null && nodeNullable !== void 0 ? nodeNullable : (_this_options_relay = this.options.relay) === null || _this_options_relay === void 0 ? void 0 : (_this_options_relay_nodeFieldOptions = _this_options_relay.nodeFieldOptions) === null || _this_options_relay_nodeFieldOptions === void 0 ? void 0 : _this_options_relay_nodeFieldOptions.nullable) !== null && _ref !== void 0 ? _ref : this.defaultFieldNullability)
},

@@ -397,3 +397,3 @@ resolve: (con) => completeValue(con.edges, (edges) => {

var _this_options_relay_cursorType, _this_options_relay2;
const { edgeCursorType = (_this_options_relay_cursorType = (_this_options_relay = this.options.relay) === null || _this_options_relay === void 0 ? void 0 : _this_options_relay.cursorType) !== null && _this_options_relay_cursorType !== void 0 ? _this_options_relay_cursorType : "String", cursorFieldOptions = {}, nodeFieldOptions: { nullable: nodeNullable = false, ...nodeFieldOptions } = {} } = (_this_options_relay2 = this.options.relay) !== null && _this_options_relay2 !== void 0 ? _this_options_relay2 : {};
const { edgeCursorType = (_this_options_relay_cursorType = (_this_options_relay = this.options.relay) === null || _this_options_relay === void 0 ? void 0 : _this_options_relay.cursorType) !== null && _this_options_relay_cursorType !== void 0 ? _this_options_relay_cursorType : "String", cursorFieldOptions = {}, nodeFieldOptions: { nullable: nodeNullable = this.defaultFieldNullability, ...nodeFieldOptions } = {} } = (_this_options_relay2 = this.options.relay) !== null && _this_options_relay2 !== void 0 ? _this_options_relay2 : {};
const edgeRef = this.objectRef(edgeName);

@@ -400,0 +400,0 @@ const edgeFields = edgeOptions.fields;

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

v3: (options)=>{
var _options_relayOptions, _options_relayOptions1, _options_relayOptions2, _options_relayOptions3, _options_relayOptions4, _options_relayOptions5, _options_relayOptions_edgesFieldOptions;
var _options_relayOptions_clientMutationId, _options_relayOptions_cursorType, _options_relayOptions_edgeCursorType, _ref, _options_relayOptions_pageInfoCursorType, _ref1, _options_relayOptions_edgesFieldOptions_nullable, _options_relayOptions_brandLoadedObjects;
var _options_relayOptions, _options_relayOptions1, _options_relayOptions2, _options_relayOptions3, _options_relayOptions4, _options_relayOptions5, _options_relayOptions_edgesFieldOptions, _options_relayOptions_nodeFieldOptions;
var _options_relayOptions_clientMutationId, _options_relayOptions_cursorType, _options_relayOptions_edgeCursorType, _ref, _options_relayOptions_pageInfoCursorType, _ref1, _options_relayOptions_edgesFieldOptions_nullable, _options_relayOptions_nodeFieldOptions_nullable, _options_relayOptions_brandLoadedObjects;
return {

@@ -132,2 +132,6 @@ relayOptions: undefined,

},
nodeFieldOptions: {
...options.relayOptions.nodeFieldOptions,
nullable: (_options_relayOptions_nodeFieldOptions_nullable = (_options_relayOptions_nodeFieldOptions = options.relayOptions.nodeFieldOptions) === null || _options_relayOptions_nodeFieldOptions === void 0 ? void 0 : _options_relayOptions_nodeFieldOptions.nullable) !== null && _options_relayOptions_nodeFieldOptions_nullable !== void 0 ? _options_relayOptions_nodeFieldOptions_nullable : false
},
brandLoadedObjects: (_options_relayOptions_brandLoadedObjects = options.relayOptions.brandLoadedObjects) !== null && _options_relayOptions_brandLoadedObjects !== void 0 ? _options_relayOptions_brandLoadedObjects : false

@@ -134,0 +138,0 @@ }

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

items: true,
list: true
list: this.defaultFieldNullability
}, ...edgesFieldOptions } = {}, pageInfoFieldOptions = {} } = (_this_options_relay2 = this.options.relay) !== null && _this_options_relay2 !== void 0 ? _this_options_relay2 : {};

@@ -403,3 +403,3 @@ const connectionRef = this.objectRef(connectionName);

var _this_options_relay_nodeFieldOptions, _this_options_relay;
var _ref, _ref1;
var _ref;
return {

@@ -429,3 +429,3 @@ pageInfo: t.field({

list: edgeListNullable,
items: (_ref1 = (_ref = edgeItemsNullable !== null && edgeItemsNullable !== void 0 ? edgeItemsNullable : nodeNullable) !== null && _ref !== void 0 ? _ref : (_this_options_relay = this.options.relay) === null || _this_options_relay === void 0 ? void 0 : (_this_options_relay_nodeFieldOptions = _this_options_relay.nodeFieldOptions) === null || _this_options_relay_nodeFieldOptions === void 0 ? void 0 : _this_options_relay_nodeFieldOptions.nullable) !== null && _ref1 !== void 0 ? _ref1 : true
items: edgeItemsNullable || ((_ref = nodeNullable !== null && nodeNullable !== void 0 ? nodeNullable : (_this_options_relay = this.options.relay) === null || _this_options_relay === void 0 ? void 0 : (_this_options_relay_nodeFieldOptions = _this_options_relay.nodeFieldOptions) === null || _this_options_relay_nodeFieldOptions === void 0 ? void 0 : _this_options_relay_nodeFieldOptions.nullable) !== null && _ref !== void 0 ? _ref : this.defaultFieldNullability)
},

@@ -453,3 +453,3 @@ resolve: (con)=>(0, _core.completeValue)(con.edges, (edges)=>{

var _this_options_relay_cursorType, _this_options_relay2;
const { edgeCursorType = (_this_options_relay_cursorType = (_this_options_relay = this.options.relay) === null || _this_options_relay === void 0 ? void 0 : _this_options_relay.cursorType) !== null && _this_options_relay_cursorType !== void 0 ? _this_options_relay_cursorType : 'String', cursorFieldOptions = {}, nodeFieldOptions: { nullable: nodeNullable = false, ...nodeFieldOptions } = {} } = (_this_options_relay2 = this.options.relay) !== null && _this_options_relay2 !== void 0 ? _this_options_relay2 : {};
const { edgeCursorType = (_this_options_relay_cursorType = (_this_options_relay = this.options.relay) === null || _this_options_relay === void 0 ? void 0 : _this_options_relay.cursorType) !== null && _this_options_relay_cursorType !== void 0 ? _this_options_relay_cursorType : 'String', cursorFieldOptions = {}, nodeFieldOptions: { nullable: nodeNullable = this.defaultFieldNullability, ...nodeFieldOptions } = {} } = (_this_options_relay2 = this.options.relay) !== null && _this_options_relay2 !== void 0 ? _this_options_relay2 : {};
const edgeRef = this.objectRef(edgeName);

@@ -456,0 +456,0 @@ const edgeFields = edgeOptions.fields;

{
"name": "@pothos/plugin-relay",
"version": "4.0.0-next.0",
"version": "4.0.0-next.1",
"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",

"peerDependencies": {
"@pothos/core": "4.0.0-next.0",
"@pothos/core": "4.0.0-next.1",
"graphql": "^16.8.1"

@@ -49,5 +49,5 @@ },

"graphql-tag": "^2.12.6",
"@pothos/core": "4.0.0-next.0",
"@pothos/plugin-complexity": "4.0.0-next.0",
"@pothos/test-utils": "2.0.0-next.0"
"@pothos/plugin-complexity": "4.0.0-next.1",
"@pothos/test-utils": "2.0.0-next.1",
"@pothos/core": "4.0.0-next.1"
},

@@ -54,0 +54,0 @@ "gitHead": "9dfe52f1975f41a111e01bf96a20033a914e2acc",

@@ -72,2 +72,6 @@ import './global-types';

},
nodeFieldOptions: {
...options.relayOptions.nodeFieldOptions,
nullable: options.relayOptions.nodeFieldOptions?.nullable ?? false,
},
brandLoadedObjects: options.relayOptions.brandLoadedObjects ?? false,

@@ -74,0 +78,0 @@ },

@@ -467,3 +467,6 @@ import { defaultTypeResolver, GraphQLResolveInfo } from 'graphql';

edgesFieldOptions: {
nullable: edgesNullable = { items: true, list: true },
nullable: edgesNullable = {
items: true,
list: this.defaultFieldNullability,
},
...edgesFieldOptions

@@ -528,6 +531,6 @@ } = {} as never,

items:
edgeItemsNullable ??
nodeNullable ??
this.options.relay?.nodeFieldOptions?.nullable ??
true,
edgeItemsNullable ||
(nodeNullable ??
this.options.relay?.nodeFieldOptions?.nullable ??
this.defaultFieldNullability),
},

@@ -569,3 +572,6 @@ resolve: (con) =>

cursorFieldOptions = {} as never,
nodeFieldOptions: { nullable: nodeNullable = false, ...nodeFieldOptions } = {} as never,
nodeFieldOptions: {
nullable: nodeNullable = this.defaultFieldNullability,
...nodeFieldOptions
} = {} as never,
} = this.options.relay ?? {};

@@ -572,0 +578,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

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