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.23.0 to 3.24.0

6

CHANGELOG.md
# Change Log
## 3.24.0
### Minor Changes
- 69be1873: Add defaultConnectionFieldOptions to relayOptions
## 3.23.0

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

3

dts/types.d.ts
import { GraphQLResolveInfo } from 'graphql';
import { EmptyToOptional, FieldKind, FieldNullability, FieldOptionsFromKind, FieldRequiredness, InputFieldMap, InputFieldRef, InputRef, InputShape, InputShapeFromFields, inputShapeKey, InterfaceParam, MaybePromise, Normalize, ObjectFieldsShape, ObjectParam, ObjectRef, ObjectTypeOptions, OutputRef, OutputRefShape, OutputShape, OutputType, ParentShape, Resolver, SchemaTypes, ShapeFromListTypeParam, ShapeFromTypeParam } from '@pothos/core';
import { EmptyToOptional, FieldKind, FieldNullability, FieldOptionsFromKind, FieldRequiredness, InputFieldMap, InputFieldRef, InputFieldsFromShape, InputRef, InputShape, InputShapeFromFields, inputShapeKey, InterfaceParam, MaybePromise, Normalize, ObjectFieldsShape, ObjectParam, ObjectRef, ObjectTypeOptions, OutputRef, OutputRefShape, OutputShape, OutputType, ParentShape, Resolver, SchemaTypes, ShapeFromListTypeParam, ShapeFromTypeParam } from '@pothos/core';
export declare type RelayPluginOptions<Types extends SchemaTypes> = EmptyToOptional<{

@@ -54,2 +54,3 @@ idFieldName?: string;

defaultMutationInputTypeOptions: Partial<Omit<PothosSchemaTypes.InputObjectTypeOptions<Types, {}>, 'fields'>>;
defaultConnectionFieldOptions?: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, {}, OutputRef<ConnectionShape<Types, unknown, false, true, true>>, boolean, InputFieldsFromShape<DefaultConnectionArguments>, ConnectionShape<Types, unknown, false, true, true>>, 'args' | 'resolve' | 'type'>;
nodesOnConnection?: boolean | Omit<PothosSchemaTypes.ObjectFieldOptions<Types, {}, [

@@ -56,0 +57,0 @@ ObjectRef<{}>

@@ -80,4 +80,6 @@ import { assertArray, ObjectRef, RootFieldBuilder } from '@pothos/core';

fieldBuilderProto.connection = function connection({ type, edgesNullable, nodeNullable, ...fieldOptions }, connectionOptionsOrRef = {}, edgeOptionsOrRef = {}) {
var ref;
const connectionRef = connectionOptionsOrRef instanceof ObjectRef ? connectionOptionsOrRef : this.builder.objectRef("Unnamed connection");
const fieldRef = this.field({
...(ref = this.builder.options.relayOptions) === null || ref === void 0 ? void 0 : ref.defaultConnectionFieldOptions,
...fieldOptions,

@@ -84,0 +86,0 @@ type: connectionRef,

@@ -84,4 +84,6 @@ "use strict";

fieldBuilderProto.connection = function connection({ type , edgesNullable , nodeNullable , ...fieldOptions }, connectionOptionsOrRef = {}, edgeOptionsOrRef = {}) {
var ref;
const connectionRef = connectionOptionsOrRef instanceof _core.ObjectRef ? connectionOptionsOrRef : this.builder.objectRef('Unnamed connection');
const fieldRef = this.field({
...(ref = this.builder.options.relayOptions) === null || ref === void 0 ? void 0 : ref.defaultConnectionFieldOptions,
...fieldOptions,

@@ -88,0 +90,0 @@ type: connectionRef,

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

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

"@pothos/core": "3.19.0",
"@pothos/plugin-complexity": "3.6.1",
"@pothos/plugin-complexity": "3.7.0",
"@pothos/test-utils": "1.3.0",

@@ -43,0 +43,0 @@ "graphql": "16.6.0",

@@ -64,2 +64,3 @@ # Relay Plugin

- `nodesOnConnection`: If true, the `nodes` field will be added to the `Connection` object types.
- `defaultConnectionFieldOptions`: Default options for connection fields defined with t.connection

@@ -66,0 +67,0 @@ ### Global IDs

@@ -195,2 +195,3 @@ import { GraphQLResolveInfo } from 'graphql';

const fieldRef = this.field({
...this.builder.options.relayOptions?.defaultConnectionFieldOptions,
...fieldOptions,

@@ -197,0 +198,0 @@ type: connectionRef,

@@ -10,2 +10,3 @@ import { GraphQLResolveInfo } from 'graphql';

InputFieldRef,
InputFieldsFromShape,
InputRef,

@@ -205,2 +206,13 @@ InputShape,

>;
defaultConnectionFieldOptions?: Omit<
PothosSchemaTypes.ObjectFieldOptions<
Types,
{},
OutputRef<ConnectionShape<Types, unknown, false, true, true>>,
boolean,
InputFieldsFromShape<DefaultConnectionArguments>,
ConnectionShape<Types, unknown, false, true, true>
>,
'args' | 'resolve' | 'type'
>;
nodesOnConnection?:

@@ -207,0 +219,0 @@ | boolean

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