graphql-schema-modular
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -23,2 +23,3 @@ /** | ||
export declare function Subscription(name: String): (target: any, methodName: any, descriptor: any) => void; | ||
export declare function Type(name: String): (target: any, methodName: any, descriptor: any) => void; | ||
export interface SchemaResult { | ||
@@ -25,0 +26,0 @@ typeDefs: any; |
@@ -55,2 +55,5 @@ "use strict"; | ||
break; | ||
case 'type': | ||
this.resolver[item.name] = item.resolver; | ||
break; | ||
} | ||
@@ -104,2 +107,14 @@ } | ||
exports.Subscription = Subscription; | ||
function Type(name) { | ||
return function (target, methodName, descriptor) { | ||
var resolver = descriptor.value; | ||
descriptor.enumerable = true; | ||
descriptor.value = { | ||
type: 'type', | ||
name: name, | ||
resolver: resolver | ||
}; | ||
}; | ||
} | ||
exports.Type = Type; | ||
var TYPE_PREFIX = "\ntype Query {\n test: String\n}\ntype Mutation {\n test: String\n}\ntype Subscription {\n test: String\n}\n"; | ||
@@ -124,7 +139,3 @@ var TYPE_SUFFIX = "\nschema {\n\tquery: Query\n\tmutation: Mutation\n\tsubscription: Subscription\n}\n"; | ||
} | ||
var typeDefs = [ | ||
TYPE_PREFIX | ||
].concat(types, [ | ||
TYPE_SUFFIX | ||
]); | ||
var typeDefs = [TYPE_PREFIX].concat(types, [TYPE_SUFFIX]); | ||
resolve({ | ||
@@ -131,0 +142,0 @@ typeDefs: typeDefs, |
{ | ||
"name": "graphql-schema-modular", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Make organizing graphql schema modules easier", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23020
192