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

@orion-js/resolvers

Package Overview
Dependencies
Maintainers
3
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orion-js/resolvers - npm Package Compare versions

Comparing version 3.4.9 to 3.5.0

lib/createResolverMiddleware.d.ts

1

lib/index.d.ts
import { resolver, modelResolver } from './resolver';
export * from './resolver/types';
export * from './createResolverMiddleware';
import checkPermissions from './resolver/getExecute/checkPermissions';

@@ -4,0 +5,0 @@ import { addPermissionChecker } from './resolver/permisionsCheckers';

@@ -21,2 +21,3 @@ "use strict";

__exportStar(require("./resolver/types"), exports);
__exportStar(require("./createResolverMiddleware"), exports);
const checkPermissions_1 = __importDefault(require("./resolver/getExecute/checkPermissions"));

@@ -23,0 +24,0 @@ exports.checkPermissions = checkPermissions_1.default;

2

lib/resolver/getExecute/index.d.ts
import { ResolverOptions, Execute } from '../types';
export default function (options: ResolverOptions): Execute<Function, undefined>;
export default function getExecute(options: ResolverOptions): Execute<Function, undefined>;

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

const initResult_1 = __importDefault(require("./initResult"));
const getResult_1 = __importDefault(require("./getResult"));
function default_1(options) {
const getResultWithMiddlewares_1 = require("./getResultWithMiddlewares");
function getExecute(options) {
const execute = async (executeParams) => {

@@ -22,3 +22,3 @@ const executeOptions = {

await (0, checkPermissions_1.default)(executeOptions, options);
const result = await (0, getResult_1.default)(options, executeOptions);
const result = await (0, getResultWithMiddlewares_1.getResultWithMiddlewares)(options, executeOptions);
return (0, initResult_1.default)(options, result);

@@ -28,2 +28,2 @@ };

}
exports.default = default_1;
exports.default = getExecute;

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

const getArgs_1 = require("./getArgs");
const createResolver = function (options) {
function createResolver(options) {
options.params = (0, cleanParams_1.default)(options.params);

@@ -23,2 +23,5 @@ options.returns = (0, cleanReturns_1.default)(options.returns);

}
if (!options.middlewares) {
options.middlewares = [];
}
const execute = (0, getExecute_1.default)(options);

@@ -35,3 +38,3 @@ const resolve = async (...args) => {

return resolver;
};
}
const resolver = createResolver;

@@ -38,0 +41,0 @@ exports.resolver = resolver;

import { OrionCache } from '@orion-js/cache';
import { Blackbox } from '@orion-js/schema';
export declare type GlobalResolverResolve = (params: any, viewer: any) => Promise<any>;

@@ -9,3 +10,3 @@ export declare type ModelResolverResolve = (item: any, params: any, viewer: any) => Promise<any>;

export interface ExecuteOptions {
params: object;
params: Blackbox;
viewer: any;

@@ -34,2 +35,3 @@ parent?: any;

permissionsOptions?: any;
middlewares?: ResolverMiddleware[];
}

@@ -55,2 +57,3 @@ export interface ResolverOptions<Resolve = Function> extends SharedResolverOptions {

export declare type PermissionChecker = (options: PermissionCheckerOptions) => Promise<string | void>;
export declare type ResolverMiddleware = (executeOptions: ExecuteOptions, next: () => Promise<any>) => Promise<any>;
export {};
{
"name": "@orion-js/resolvers",
"version": "3.4.9",
"version": "3.5.0",
"main": "lib/index.js",

@@ -20,5 +20,5 @@ "types": "lib/index.d.ts",

"dependencies": {
"@orion-js/cache": "^3.4.1",
"@orion-js/helpers": "^3.4.1",
"@orion-js/schema": "^3.4.9"
"@orion-js/cache": "^3.5.0",
"@orion-js/helpers": "^3.5.0",
"@orion-js/schema": "^3.5.0"
},

@@ -37,3 +37,3 @@ "devDependencies": {

},
"gitHead": "e9c223e70752b6c613f58e63f8fd9fab471618de"
"gitHead": "6fc8b0e40fad04d7ff84cf0849cbf260a66b6641"
}
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