New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@homebound/graphql-typescript-simple-resolvers

Package Overview
Dependencies
Maintainers
23
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@homebound/graphql-typescript-simple-resolvers - npm Package Compare versions

Comparing version 1.36.0 to 1.37.0

12

build/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = void 0;
const change_case_1 = require("change-case");
const graphql_1 = require("graphql");
const change_case_1 = require("change-case");
const ts_poet_1 = require("ts-poet");
const upper_case_first_1 = require("upper-case-first");
const ts_poet_1 = require("ts-poet");
const types_1 = require("./types");

@@ -43,2 +43,4 @@ const builtInScalarsImps = ["Int", "Boolean", "String", "ID", "Float"];

generateEachInterfaceResolverType(chunks, config, interfaceToImpls, interfaceTypes);
// Make union types of interfaces
generateInterfaceUnionTypes(chunks, config, interfaceToImpls);
// Make each resolver for any output type, whether its required or optional

@@ -86,2 +88,8 @@ generateEachResolverType(chunks, config, interfaceToImpls, allTypesWithResolvers);

}
// Also add type unions of the possible types for use in code if desired
function generateInterfaceUnionTypes(chunks, config, interfaceToImpls) {
interfaceToImpls.forEach((impls, inter) => chunks.push(ts_poet_1.code `
export type ${inter.name}Types = ${types_1.joinCodes(impls.map(imp => ts_poet_1.code `${types_1.mapObjectType(config, imp)}`), " | ")};
`));
}
function generateEachResolverType(chunks, config, interfaceToImpls, allTypesWithResolvers) {

@@ -88,0 +96,0 @@ const ctx = types_1.toImp(config.contextType);

@@ -28,2 +28,6 @@ import { Context, AuthorId, Popularity } from "./entities";

}
export type HasNameTypes = AuthorId | Book;
export type FieldWithArgsTypes = AuthorId | Book;
export interface AuthorResolvers extends HasNameResolvers<AuthorId>, FieldWithArgsResolvers<AuthorId> {

@@ -30,0 +34,0 @@ summary: Resolver<AuthorId, {}, AuthorSummary>;

2

package.json
{
"name": "@homebound/graphql-typescript-simple-resolvers",
"version": "1.36.0",
"version": "1.37.0",
"main": "./build/index.js",

@@ -5,0 +5,0 @@ "types": "./build/",

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