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

@pothos/plugin-with-input

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pothos/plugin-with-input - npm Package Compare versions

Comparing version 3.5.0 to 3.6.0

10

CHANGELOG.md
# @pothos/plugin-with-input
## 3.6.0
### Minor Changes
- 3a7ff291: Refactor internal imports to remove import cycles
### Patch Changes
- 3a7ff291: Update dev dependencies
## 3.5.0

@@ -4,0 +14,0 @@

2

dts/global-types.d.ts
import { FieldKind, FieldNullability, FieldRef, InputFieldRef, SchemaTypes, ShapeFromTypeParam, TypeParam } from '@pothos/core';
import { FieldWithInputOptions, WithInputBuilderOptions } from './types';
import { PothosWithInputPlugin } from '.';
import type { PothosWithInputPlugin } from '.';
declare global {

@@ -5,0 +5,0 @@ export namespace PothosSchemaTypes {

@@ -7,3 +7,3 @@ import { InputFieldBuilder, RootFieldBuilder } from '@pothos/core';

rootBuilderProto.fieldWithInput = function fieldWithInput({ typeOptions: { name: typeName, ...typeOptions } = {}, argOptions: { name: argName = "input", ...argOptions } = {}, args, input, ...fieldOptions }) {
var ref1;
var ref;
const inputRef = this.builder.inputRef(typeName !== null && typeName !== void 0 ? typeName : `UnnamedWithInputOn${this.typename}`);

@@ -15,3 +15,3 @@ const fieldRef = this.field({

required: true,
...(ref1 = this.builder.options.withInput) === null || ref1 === void 0 ? void 0 : ref1.argOptions,
...(ref = this.builder.options.withInput) === null || ref === void 0 ? void 0 : ref.argOptions,
...argOptions,

@@ -18,0 +18,0 @@ type: inputRef

@@ -5,31 +5,37 @@ "use strict";

});
var _exportNames = {
PothosWithInputPlugin: true
};
exports.default = void 0;
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
default: ()=>_default,
PothosWithInputPlugin: ()=>PothosWithInputPlugin
});
require("./global-types");
require("./schema-builder");
var _core = _interopRequireWildcard(require("@pothos/core"));
var _types = _interopRequireWildcard(require("./types"));
Object.keys(_types).forEach(function(key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _types[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function() {
return _types[key];
}
const _core = /*#__PURE__*/ _interopRequireWildcard(require("@pothos/core"));
_exportStar(require("./types"), exports);
function _exportStar(from, to) {
Object.keys(from).forEach(function(k) {
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
enumerable: true,
get: function() {
return from[k];
}
});
});
});
function _getRequireWildcardCache() {
return from;
}
function _getRequireWildcardCache(nodeInterop) {
if (typeof WeakMap !== "function") return null;
var cache = new WeakMap();
_getRequireWildcardCache = function() {
return cache;
};
return cache;
var cacheBabelInterop = new WeakMap();
var cacheNodeInterop = new WeakMap();
return (_getRequireWildcardCache = function(nodeInterop) {
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
})(nodeInterop);
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
function _interopRequireWildcard(obj, nodeInterop) {
if (!nodeInterop && obj && obj.__esModule) {
return obj;

@@ -42,3 +48,3 @@ }

}
var cache = _getRequireWildcardCache();
var cache = _getRequireWildcardCache(nodeInterop);
if (cache && cache.has(obj)) {

@@ -50,3 +56,3 @@ return cache.get(obj);

for(var key in obj){
if (Object.prototype.hasOwnProperty.call(obj, key)) {
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;

@@ -67,9 +73,7 @@ if (desc && (desc.get || desc.set)) {

const pluginName = 'withInput';
var _default = pluginName;
exports.default = _default;
const _default = pluginName;
class PothosWithInputPlugin extends _core.BasePlugin {
}
exports.PothosWithInputPlugin = PothosWithInputPlugin;
_core.default.registerPlugin(pluginName, PothosWithInputPlugin);
//# sourceMappingURL=index.js.map
"use strict";
var _core = require("@pothos/core");
Object.defineProperty(exports, "__esModule", {
value: true
});
const _core = require("@pothos/core");
const rootBuilderProto = _core.RootFieldBuilder.prototype;

@@ -8,3 +11,3 @@ function capitalize(s) {

rootBuilderProto.fieldWithInput = function fieldWithInput({ typeOptions: { name: typeName , ...typeOptions } = {} , argOptions: { name: argName = 'input' , ...argOptions } = {} , args , input , ...fieldOptions }) {
var ref1;
var ref;
const inputRef = this.builder.inputRef(typeName !== null && typeName !== void 0 ? typeName : `UnnamedWithInputOn${this.typename}`);

@@ -16,3 +19,3 @@ const fieldRef = this.field({

required: true,
...(ref1 = this.builder.options.withInput) === null || ref1 === void 0 ? void 0 : ref1.argOptions,
...(ref = this.builder.options.withInput) === null || ref === void 0 ? void 0 : ref.argOptions,
...argOptions,

@@ -28,4 +31,3 @@ type: inputRef

this.builder.inputType(name, {
fields: ()=>input
,
fields: ()=>input,
...(ref = this.builder.options.withInput) === null || ref === void 0 ? void 0 : ref.typeOptions,

@@ -32,0 +34,0 @@ ...typeOptions

{
"name": "@pothos/plugin-with-input",
"version": "3.5.0",
"version": "3.6.0",
"description": "A Pothos plugin for defining fields with input objects",

@@ -35,5 +35,5 @@ "main": "./lib/index.js",

"devDependencies": {
"@pothos/core": "3.11.0",
"@pothos/plugin-validation": "3.4.0",
"@pothos/test-utils": "1.2.0",
"@pothos/core": "3.13.0",
"@pothos/plugin-validation": "3.5.0",
"@pothos/test-utils": "1.3.0",
"graphql": "16.5.0",

@@ -40,0 +40,0 @@ "graphql-tag": "^2.12.6"

@@ -11,4 +11,5 @@ import {

import { FieldWithInputOptions, WithInputBuilderOptions } from './types';
import { PothosWithInputPlugin } from '.';
import type { PothosWithInputPlugin } from '.';
declare global {

@@ -15,0 +16,0 @@ export namespace PothosSchemaTypes {

{
"compilerOptions": {
"skipLibCheck": true,
"skipLibCheck": false
},

@@ -8,4 +8,4 @@ "extends": "../../tsconfig.options.json",

"src/**/*",
"tests/**/*",
"tests/**/*"
]
}
}

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

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