@homebound/graphql-typescript-scalar-type-policies
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -18,5 +18,5 @@ "use strict"; | ||
.map(type => { | ||
return ts_poet_1.code `${type.name}: {${Object.values(type.getFields()) | ||
return ts_poet_1.code `${type.name}: { fields: { ${Object.values(type.getFields()) | ||
.filter(isScalarWithTypePolicy) | ||
.map(field => ts_poet_1.code `${field.name}: ${toImp(scalarTypePolicies[field.type.name])},`)}},`; | ||
.map(field => ts_poet_1.code `${field.name}: ${toImp(scalarTypePolicies[field.type.name])},`)}} },`; | ||
})} | ||
@@ -23,0 +23,0 @@ }; |
import { dateTypePolicy } from "src/dates"; | ||
export const scalarTypePolicies = { | ||
Author: { date: dateTypePolicy }, | ||
Author: { fields: { date: dateTypePolicy } }, | ||
}; |
{ | ||
"name": "@homebound/graphql-typescript-scalar-type-policies", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"main": "./build/index.js", | ||
@@ -5,0 +5,0 @@ "types": "./build/", |
Sorry, the diff of this file is not supported yet
5853