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

@homebound/graphql-typescript-scalar-type-policies

Package Overview
Dependencies
Maintainers
46
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@homebound/graphql-typescript-scalar-type-policies - npm Package Compare versions

Comparing version 2.7.0 to 2.8.0

20

build/index.js

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

let type = f.type;
if (graphql_1.isNonNullType(type)) {
if ((0, graphql_1.isNonNullType)(type)) {
type = type.ofType;

@@ -17,17 +17,17 @@ }

}
const content = await ts_poet_1.code `
const content = await (0, ts_poet_1.code) `
export const scalarTypePolicies = {
${Object.values(schema.getTypeMap())
.filter(isObjectType)
.filter(t => !t.name.startsWith("__"))
.filter(t => Object.values(t.getFields()).some(isScalarWithTypePolicy))
.map(type => {
return ts_poet_1.code `${type.name}: { fields: { ${Object.values(type.getFields())
.filter((t) => !t.name.startsWith("__"))
.filter((t) => Object.values(t.getFields()).some(isScalarWithTypePolicy))
.map((type) => {
return (0, ts_poet_1.code) `${type.name}: { fields: { ${Object.values(type.getFields())
.filter(isScalarWithTypePolicy)
.map(field => {
.map((field) => {
let type = field.type;
if (graphql_1.isNonNullType(type)) {
if ((0, graphql_1.isNonNullType)(type)) {
type = type.ofType;
}
return ts_poet_1.code `${field.name}: ${toImp(scalarTypePolicies[type.name])},`;
return (0, ts_poet_1.code) `${field.name}: ${toImp(scalarTypePolicies[type.name])},`;
})} } },`;

@@ -54,4 +54,4 @@ })}

const [path, symbol] = spec.split("#");
return ts_poet_1.imp(`${symbol}@${path}`);
return (0, ts_poet_1.imp)(`${symbol}@${path}`);
}
exports.toImp = toImp;

@@ -5,3 +5,5 @@ import { dateTypePolicy } from "src/dates";

Author: { fields: { birthday: dateTypePolicy, deathday: dateTypePolicy } },
CalendarInterval: { fields: { startDate: dateTypePolicy, endDate: dateTypePolicy } },
CalendarInterval: {
fields: { endDate: dateTypePolicy, startDate: dateTypePolicy },
},
};
{
"name": "@homebound/graphql-typescript-scalar-type-policies",
"version": "2.7.0",
"version": "2.8.0",
"main": "./build/index.js",

@@ -15,14 +15,14 @@ "types": "./build/",

"dependencies": {
"@graphql-codegen/plugin-helpers": "^2.0.0",
"@graphql-codegen/plugin-helpers": "^2.6.2",
"change-case": "^4.1.1",
"ts-poet": "^4.5.0"
"ts-poet": "^5.0.1"
},
"devDependencies": {
"@graphql-codegen/cli": "^2.0.1",
"@graphql-codegen/cli": "^2.11.8",
"graphql": "^15.5.1",
"husky": "^3.0.9",
"jest": "^27.0.6",
"prettier": "^2.3.2",
"prettier": "^2.7.1",
"ts-jest": "^27.0.4",
"typescript": "^4.3.5"
"typescript": "^4.8.2"
},

@@ -29,0 +29,0 @@ "husky": {

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