UNPKG

@nyteshade/lattice-legacy

Version:

OO Underpinnings for ease of GraphQL Implementation

1,815 lines (528 loc) 138 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>decorators - Documentation</title> <script src="scripts/prettify/prettify.js"></script> <script src="scripts/prettify/lang-css.js"></script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <input type="checkbox" id="nav-trigger" class="nav-trigger" /> <label for="nav-trigger" class="navicon-button x"> <div class="navicon"></div> </label> <label for="nav-trigger" class="overlay"></label> <nav> <li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading">Classes</li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="AwaitingPromiseError.html">AwaitingPromiseError</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="AwaitingPromiseError.html#%25E2%258C%25BE%25E2%25A0%2580asyncFn">⌾⠀asyncFn</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="AwaitingPromiseError.html#%25E2%258C%25BE%25E2%25A0%2580setPromise">⌾⠀setPromise</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="AwaitingPromiseError_exports.AwaitingPromiseError.html">AwaitingPromiseError</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="AwaitingPromiseError_exports.AwaitingPromiseError.html#setPromise">setPromise</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="Deferred_exports.Deferred.html">Deferred</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="DirectTypeAdd.html">DirectTypeAdd</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="FunctionExecutionError_FunctionExecutionError.html">FunctionExecutionError</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="GQLBase.html">GQLBase</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#.apiDocs">apiDocs</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#.%25E2%258C%25BE%25E2%25A0%2580getMergedRoot">⌾⠀getMergedRoot</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#.%25E2%258C%25BE%25E2%25A0%2580getProp">⌾⠀getProp</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#.%25E2%258C%25BE%25E2%25A0%2580getResolver">⌾⠀getResolver</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#.%25E2%258C%25BE%25E2%25A0%2580IDLFilePath">⌾⠀IDLFilePath</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#.%25E2%258C%25BE%25E2%25A0%2580MUTATORS">⌾⠀MUTATORS</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#.%25E2%258C%25BE%25E2%25A0%2580RESOLVERS">⌾⠀RESOLVERS</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#.%25E2%258C%25BE%25E2%25A0%2580setupModel">⌾⠀setupModel</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#.%25E2%25AC%2587%25EF%25B8%258E%25E2%25A0%2580handler">⬇︎⠀handler</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#.%25E2%25AC%2587%25EF%25B8%258E%25E2%25A0%2580SCHEMA">⬇︎⠀SCHEMA</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#%25E2%258C%25BE%25E2%25A0%2580applyAutoProps">⌾⠀applyAutoProps</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#%25E2%258C%25BE%25E2%25A0%2580callProp">⌾⠀callProp</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#%25E2%258C%25BE%25E2%25A0%2580extendModel">⌾⠀extendModel</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#%25E2%258C%25BE%25E2%25A0%2580getModel">⌾⠀getModel</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#%25E2%258C%25BE%25E2%25A0%2580getProp">⌾⠀getProp</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#%25E2%258C%25BE%25E2%25A0%2580getResolver">⌾⠀getResolver</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#%25E2%258C%25BE%25E2%25A0%2580setModel">⌾⠀setModel</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#%25E2%25AC%2586%25EF%25B8%258E%25E2%25A0%2580requestData">⬆︎⠀requestData</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#%25E2%25AC%2587%25EF%25B8%258E%25E2%25A0%2580requestData">⬇︎⠀requestData</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#~deleteProperty">deleteProperty</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBase.html#~set">set</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="GQLBase.%25E2%258E%2586%25E2%25A0%2580constructor.html">⎆⠀constructor</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="GQLEnum.html">GQLEnum</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLEnum.html#..get">.get</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLEnum.html#..set">.set</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLEnum.html#.valueFor">valueFor</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLEnum.html#.%25E2%25AC%2587%25EF%25B8%258E%25E2%25A0%2580enums">⬇︎⠀enums</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLEnum.html#.%25E2%25AC%2587%25EF%25B8%258E%25E2%25A0%2580name">⬇︎⠀name</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLEnum.html#.%25E2%25AC%2587%25EF%25B8%258E%25E2%25A0%2580value">⬇︎⠀value</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLEnum.html#.%25E2%25AC%2587%25EF%25B8%258E%25E2%25A0%2580values">⬇︎⠀values</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLEnum.html#GenerateEnumsProxyHandler">GenerateEnumsProxyHandler</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="GQLExpressMiddleware.html">GQLExpressMiddleware</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLExpressMiddleware.html#.clearCache">clearCache</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLExpressMiddleware.html#.%25E2%258C%25BE%25E2%25A0%2580generateSchemaSDL">⌾⠀generateSchemaSDL</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLExpressMiddleware.html#astMiddleware">astMiddleware</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLExpressMiddleware.html#schemaMiddleware">schemaMiddleware</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLExpressMiddleware.html#%25E2%258C%25BE%25E2%25A0%2580customMiddleware">⌾⠀customMiddleware</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLExpressMiddleware.html#%25E2%25AC%2587%25EF%25B8%258E%25E2%25A0%2580middleware">⬇︎⠀middleware</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLExpressMiddleware.html#%25E2%25AC%2587%25EF%25B8%258E%25E2%25A0%2580middlewareWithoutGraphiQL">⬇︎⠀middlewareWithoutGraphiQL</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLExpressMiddleware.html#%25E2%25AC%2587%25EF%25B8%258E%25E2%25A0%2580schema">⬇︎⠀schema</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="GQLExpressMiddleware.%25E2%258E%2586%25E2%25A0%2580constructor.html">⎆⠀constructor</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="GQLInterface.html">GQLInterface</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLInterface.html#.%25E2%258C%25BE%25E2%25A0%2580resolveType">⌾⠀resolveType</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="GQLScalar.html">GQLScalar</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLScalar.html#.parseLiteral">parseLiteral</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLScalar.html#.parseValue">parseValue</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLScalar.html#.serialize">serialize</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="IDLFileHandler.html">IDLFileHandler</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="IDLFileHandler.html#%25E2%258C%25BE%25E2%25A0%2580getFile">⌾⠀getFile</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="IDLFileHandler.html#%25E2%258C%25BE%25E2%25A0%2580getSchema">⌾⠀getSchema</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="IDLFileHandler.html#%25E2%258C%25BE%25E2%25A0%2580getSyntaxTree">⌾⠀getSyntaxTree</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="IDLFileHandler.%25E2%258E%2586%25E2%25A0%2580constructor.html">⎆⠀constructor</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="ModuleParser.html">ModuleParser</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="ModuleParser.html#.%25E2%258C%25BE%25E2%25A0%2580arrayToPattern">⌾⠀arrayToPattern</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="ModuleParser.html#.%25E2%258C%25BE%25E2%25A0%2580checkForPackageExtensions">⌾⠀checkForPackageExtensions</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="ModuleParser.html#%25E2%258C%25BE%25E2%25A0%2580findGQLBaseClasses">⌾⠀findGQLBaseClasses</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="ModuleParser.html#%25E2%258C%25BE%25E2%25A0%2580importClass">⌾⠀importClass</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="ModuleParser.html#%25E2%258C%25BE%25E2%25A0%2580parse">⌾⠀parse</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="ModuleParser.html#%25E2%258C%25BE%25E2%25A0%2580parseSync">⌾⠀parseSync</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="ModuleParser.html#~%25E2%258C%25BE%25E2%25A0%2580walk">⌾⠀walk</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="ModuleParser.html#~%25E2%258C%25BE%25E2%25A0%2580walkSync">⌾⠀walkSync</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="ModuleParser.html#~%25E2%258E%2586%25E2%25A0%2580constructor">⎆⠀constructor</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="ModuleParser.exports.ModuleParser.html">exports.ModuleParser</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="SchemaUtils.html">SchemaUtils</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SchemaUtils.html#.%25E2%258C%25BE%25E2%25A0%2580createMergedRoot">⌾⠀createMergedRoot</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SchemaUtils.html#.%25E2%258C%25BE%25E2%25A0%2580injectComments">⌾⠀injectComments</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SchemaUtils.html#.%25E2%258C%25BE%25E2%25A0%2580injectEnums">⌾⠀injectEnums</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SchemaUtils.html#.%25E2%258C%25BE%25E2%25A0%2580injectInterfaceResolvers">⌾⠀injectInterfaceResolvers</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SchemaUtils.html#.%25E2%258C%25BE%25E2%25A0%2580injectScalars">⌾⠀injectScalars</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="SyntaxTree.html">SyntaxTree</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#.%25E2%258C%25BE%25E2%25A0%2580EmptyDocument">⌾⠀EmptyDocument</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#.%25E2%258C%25BE%25E2%25A0%2580EmptyMutation">⌾⠀EmptyMutation</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#.%25E2%258C%25BE%25E2%25A0%2580EmptyQuery">⌾⠀EmptyQuery</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#.%25E2%258C%25BE%25E2%25A0%2580findDefinition">⌾⠀findDefinition</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#.%25E2%258C%25BE%25E2%25A0%2580findField">⌾⠀findField</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#.%25E2%258C%25BE%25E2%25A0%2580findInASTArrayByNameValue">⌾⠀findInASTArrayByNameValue</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#.%25E2%258C%25BE%25E2%25A0%2580from">⌾⠀from</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#.%25E2%258C%25BE%25E2%25A0%2580fromAST">⌾⠀fromAST</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#.%25E2%258C%25BE%25E2%25A0%2580fromSchema">⌾⠀fromSchema</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#.%25E2%258E%2586%25E2%25A0%2580constructor">⎆⠀constructor</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#%25E2%258C%25BE%25E2%25A0%2580appendDefinitions">⌾⠀appendDefinitions</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#%25E2%258C%25BE%25E2%25A0%2580consumeDefinition">⌾⠀consumeDefinition</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#%25E2%258C%25BE%25E2%25A0%2580find">⌾⠀find</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#%25E2%258C%25BE%25E2%25A0%2580findEnumDefinition">⌾⠀findEnumDefinition</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#%25E2%258C%25BE%25E2%25A0%2580setAST">⌾⠀setAST</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#%25E2%258C%25BE%25E2%25A0%2580toString">⌾⠀toString</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#%25E2%258C%25BE%25E2%25A0%2580updateAST">⌾⠀updateAST</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#%25E2%25AC%2586%25EF%25B8%258E%25E2%25A0%2580ast">⬆︎⠀ast</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="SyntaxTree.html#%25E2%25AC%2587%25EF%25B8%258E%25E2%25A0%2580ast">⬇︎⠀ast</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="utils.Deferred.html">Deferred</a></span></li><li class="nav-heading">Namespaces</li><li class="nav-heading"><span class="nav-item-type type-namespace">N</span><span class="nav-item-name"><a href="decorators.html">decorators</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="decorators.html#.%25E2%258C%25BE%25E2%25A0%2580extractBits">⌾⠀extractBits</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="decorators.html#..%25F0%259F%258F%25B7%25E2%25A0%2580AdjacentSchema">.🏷⠀AdjacentSchema</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="decorators.html#..%25F0%259F%258F%25B7%25E2%25A0%2580FileSchema">.🏷⠀FileSchema</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="decorators.html#..%25F0%259F%258F%25B7%25E2%25A0%2580Getters">.🏷⠀Getters</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="decorators.html#..%25F0%259F%258F%25B7%25E2%25A0%2580Properties">.🏷⠀Properties</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="decorators.html#..%25F0%259F%258F%25B7%25E2%25A0%2580Schema">.🏷⠀Schema</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="decorators.html#..%25F0%259F%258F%25B7%25E2%25A0%2580Setters">.🏷⠀Setters</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="decorators.html#~decorate">decorate</a></span></li><li class="nav-heading"><span class="nav-item-type type-namespace">N</span><span class="nav-item-name"><a href="GQLBaseEnv.html">GQLBaseEnv</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="GQLBaseEnv.html#~notDefined">notDefined</a></span></li><li class="nav-heading"><a href="global.html">Globals</a></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#applyTags">applyTags</a></span></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#AsyncFunctionExecutionError">AsyncFunctionExecutionError</a></span></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#CHECK_API_DOCS">CHECK_API_DOCS</a></span></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#CHECK_RESOLVERS">CHECK_RESOLVERS</a></span></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#CHECK_SCHEMA">CHECK_SCHEMA</a></span></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#CHECKLIST">CHECKLIST</a></span></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#FunctionExecutionError">FunctionExecutionError</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#getChecklist">getChecklist</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#hasChecklist">hasChecklist</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#newChecklist">newChecklist</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#setChecklist">setChecklist</a></span></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#types">types</a></span></li> </nav> <div id="main"> <h1 class="page-title">decorators</h1> <section> <header> <h2> decorators </h2> </header> <article> <div class="container-overview"> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="decorators_ModelProperties.js.html">decorators/ModelProperties.js</a>, <a href="decorators_ModelProperties.js.html#line232">line 232</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Members</h3> <div class="section-members"> <h4 class="name" id=".DirectTypeManager"><span class="type-signature">(static, constant) </span>DirectTypeManager<span class="type-signature"> :Object</span></h4> <div class="description"> <p>A small suite of functions a getter that allows easy manipulation of the<br>the DIRECT_TYPES workaround needed for some types of complex class<br>wrapping allowed by the @Getters and @Properties decorators. Namely the<br>ability to do something like @Getters('name', String) which would wrap the<br>contents of whatever is in the objects model in a String call.</p> <p>Direct types are those that need to be called without <code>new</code> in order for the<br>desired behavior to present itself.</p> </div> <dl class="details"> <dt class="tag-since">Since:</dt> <dd class="tag-since"><ul class="dummy"><li>2.7.0</li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="decorators_ModelProperties.js.html">decorators/ModelProperties.js</a>, <a href="decorators_ModelProperties.js.html#line250">line 250</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type"><code>Object</code></span> </li> </ul> </div> <h3 class="subsection-title">Methods</h3> <div class="section-method"> <h4 class="name" id=".%E2%8C%BE%E2%A0%80extractBits"><span class="type-signature">(static) </span>⌾⠀extractBits<span class="signature">(property)</span><span class="type-signature"> &rarr; {Object}</span></h4> <div class="description"> <p>For each of the decorators, Getters, Setters, and Properties, we take a<br>list of property names used to create the appropriate accessor types. In<br>some cases, however, the instance of GQLBase's data model may have a<br>different name. Finally if the return type for the getter should be wrapped<br>in a another GQLBase class type, we will need a way to specify those things<br>too.</p> <p>The <code>extractBits()</code> takes a single argument value from the decorator as it<br>parses them and converts it into an object, properly sorted, into values that<br>allow the above described behavior.</p> <p>Examples:</p> <p>```<br>// Create a class with a name and age property that map directly to the<br>// underlying data model</p> </div> <dl class="details"> <dt class="tag-since">Since:</dt> <dd class="tag-since"><ul class="dummy"><li>2.5</li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="decorators_ModelProperties.js.html">decorators/ModelProperties.js</a>, <a href="decorators_ModelProperties.js.html#line38">line 38</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>property</code></td> <td class="type"> <span class="param-type"><code>String</code></span> | <span class="param-type"><code>Array.&lt;(String|function())></code></span> </td> <td class="description last"> <p>name of a property, or list<br>of property names and a Class.</p> </td> </tr> </tbody> </table> <div class="section-returns"> <h5>Returns:</h5> <dl class="param-type"> <dt> Type: </dt> <dd> <span class="param-type"><code>Object</code></span> </dd> </dl> <div class="param-desc"> <p>an object with the following format <code>{ fieldName: name of root instance property to create modelName: name of its associated internal model property typeClass: an optional class to wrap around the results in a getter }</code></p> </div> </div> </div> <div class="section-method"> <h4 class="name" id="..%F0%9F%8F%B7%E2%A0%80AdjacentSchema"><span class="type-signature">(static) </span>.🏷⠀AdjacentSchema<span class="signature">(object, property, descriptor)</span><span class="type-signature"></span></h4> <div class="description"> <p>A decorator that does three things. First it defines the<br>module() static method that is required when using adjacent<br>schema files. Secondly, it defines a SCHEMA getter that<br>returns <code>GQLBase.ADJACENT_FILE</code>. Finally it sets a static<br>getter with the <code>Symbol</code>, <code>@adjacentSchema</code> so that other<br>can determine whether or not the decorator was used.</p> </div> <dl class="details"> <dt class="tag-since">Since:</dt> <dd class="tag-since"><ul class="dummy"><li>2.1.0</li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="decorators_AdjacentSchema.js.html">decorators/AdjacentSchema.js</a>, <a href="decorators_AdjacentSchema.js.html#line22">line 22</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>object</code></td> <td class="type"> <span class="param-type"><code>mixed</code></span> </td> <td class="description last"> <p>the object on which to apply the decorator</p> </td> </tr> <tr> <td class="name"><code>property</code></td> <td class="type"> <span class="param-type"><code>String</code></span> </td> <td class="description last"> <p>the name of the object or property to<br>which the decorator is being applied.</p> </td> </tr> <tr> <td class="name"><code>descriptor</code></td> <td class="type"> <span class="param-type"><code>Object</code></span> </td> <td class="description last"> <p>a standard Object.defineProperty style<br>descriptor object.</p> </td> </tr> </tbody> </table> </div> <div class="section-method"> <h4 class="name" id="..%F0%9F%8F%B7%E2%A0%80FileSchema"><span class="type-signature">(static) </span>.🏷⠀FileSchema<span class="signature">(path, extension)</span><span class="type-signature"> &rarr; {mixed}</span></h4> <div class="description"> <p>A decorator that does three things. First it defines the<br>module() static method that is required when using adjacent<br>schema files. Secondly, it defines a SCHEMA getter that<br>returns <code>GQLBase.ADJACENT_FILE</code>. Finally it sets a static<br>getter with the <code>Symbol</code>, <code>@adjacentSchema</code> so that other<br>can determine whether or not the decorator was used.</p> </div> <dl class="details"> <dt class="tag-since">Since:</dt> <dd class="tag-since"><ul class="dummy"><li>2.3.0</li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="decorators_FileSchema.js.html">decorators/FileSchema.js</a>, <a href="decorators_FileSchema.js.html#line22">line 22</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>path</code></td> <td class="type"> <span class="param-type"><code>String</code></span> </td> <td class="description last"> <p>a relative or absolute path to the file containing<br>your GraphQL IDL schema portion for your object type.</p> </td> </tr> <tr> <td class="name"><code>extension</code></td> <td class="type"> <span class="param-type"><code>String</code></span> </td> <td class="description last"> <p>the extension of the graphql schema file pointed<br>to in the previous parameter. By default these are <code>&quot;.graphql&quot;</code> but should<br>your path point to a file with a different extension, you should specify<br>that extension here.</p> </td> </tr> </tbody> </table> <div class="section-returns"> <h5>Returns:</h5> <dl class="param-type"> <dt> Type: </dt> <dd> <span class="param-type"><code>mixed</code></span> </dd> </dl> <div class="param-desc"> <p>as per all class decorators, <code>FileSchema</code> returns the<br>class object being modified</p> </div> </div> </div> <div class="section-method"> <h4 class="name" id="..%F0%9F%8F%B7%E2%A0%80Getters"><span class="type-signature">(static) </span>.🏷⠀Getters<span class="signature">(propertyNames)</span><span class="type-signature"> &rarr; {function}</span></h4> <div class="description"> <p>When working with <code>GQLBase</code> instances that expose properties<br>that have a 1:1 mapping to their own model property of the<br>same name, adding the getters manually can be annoying. This<br>takes an indeterminate amount of strings representing the<br>properties for which getters should be injected.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="decorators_ModelProperties.js.html">decorators/ModelProperties.js</a>, <a href="decorators_ModelProperties.js.html#line348">line 348</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>propertyNames</code></td> <td class="type"> <span class="param-type"><code>Array.&lt;(String|Array.&lt;String>)></code></span> </td> <td class="description last"> <p>if the model has 'name'<br>and 'age' as properties, then passing those two strings will result<br>in getters that surface those properties as GraphQL fields.</p> </td> </tr> </tbody> </table> <div class="section-returns"> <h5>Returns:</h5> <dl class="param-type"> <dt> Type: </dt> <dd> <span class="param-type"><code>function</code></span> </dd> </dl> <div class="param-desc"> <p>a class decorator method.s</p> </div> </div> </div> <div class="section-method"> <h4 class="name" id="..%F0%9F%8F%B7%E2%A0%80Properties"><span class="type-signature">(static) </span>.🏷⠀Properties<span class="signature">(propertyNames)</span><span class="type-signature"> &rarr; {function}</span></h4> <div class="description"> <p>When working with <code>GQLBase</code> instances that expose properties<br>that have a 1:1 mapping to their own model property of the<br>same name, adding the getters manually can be annoying. This<br>takes an indeterminate amount of strings representing the<br>properties for which getters should be injected.</p> <p>This method creates both getters and setters</p> </div> <dl class="details"> <dt class="tag-since">Since:</dt> <dd class="tag-since"><ul class="dummy"><li>2.1.0</li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="decorators_ModelProperties.js.html">decorators/ModelProperties.js</a>, <a href="decorators_ModelProperties.js.html#line427">line 427</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>propertyNames</code></td> <td class="type"> <span class="param-type"><code>Array.&lt;(String|Array.&lt;String>)></code></span> </td> <td class="description last"> <p>if the model has 'name'<br>and 'age' as properties, then passing those two strings will result<br>in getters and setters that surface those properties as GraphQL fields.</p> </td> </tr> </tbody> </table> <div class="section-returns"> <h5>Returns:</h5> <dl class="param-type"> <dt> Type: </dt> <dd> <span class="param-type"><code>function</code></span> </dd> </dl> <div class="param-desc"> <p>a class decorator method</p> </div> </div> </div> <div class="section-method"> <h4 class="name" id="..%F0%9F%8F%B7%E2%A0%80Schema"><span class="type-signature">(static) </span>.🏷⠀Schema<span class="signature">(schemaString)</span><span class="type-signature"></span></h4> <div class="description"> <p>This decorator allows you to specify the SCHEMA getter and associated<br>string as a parameter to the decorator itself. So, for example:</p> <p><code></p> </div> <dl class="details"> <dt class="tag-since">Since:</dt> <dd class="tag-since"><ul class="dummy"><li>2.2.0</li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="decorators_Schema.js.html">decorators/Schema.js</a>, <a href="decorators_Schema.js.html#line18">line 18</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>schemaString</code></td> <td class="type"> <span class="param-type"><code>string</code></span> </td> <td class="description last"> <p>a GraphQL IDL compliant string for defining a<br>GraphQL Object Schema.</p> </td> </tr> </tbody> </table> </div> <div class="section-method"> <h4 class="name" id="..%F0%9F%8F%B7%E2%A0%80Setters"><span class="type-signature">(static) </span>.🏷⠀Setters<span class="signature">(propertyNames)</span><span class="type-signature"> &rarr; {function}</span></h4> <div class="description"> <p>When working with <code>GQLBase</code> instances that expose properties<br>that have a 1:1 mapping to their own model property of the<br>same name, adding the setters manually can be annoying. This<br>takes an indeterminate amount of strings representing the<br>properties for which setters should be injected.</p> </div> <dl class="details"> <dt class="tag-since">Since:</dt> <dd class="tag-since"><ul class="dummy"><li>2.1.0</li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="decorators_ModelProperties.js.html">decorators/ModelProperties.js</a>, <a href="decorators_ModelProperties.js.html#line387">line 387</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>propertyNames</code></td> <td class="type"> <span class="param-type"><code>Array.&lt;(String|Array.&lt;String>)></code></span> </td> <td class="description last"> <p>if the model has<br>'name' and 'age' as properties, then passing those two strings will<br>result in setters that surface those properties as GraphQL fields.</p> </td> </tr> </tbody> </table> <div class="section-returns"> <h5>Returns:</h5> <dl class="param-type"> <dt> Type: </dt> <dd> <span class="param-type"><code>function</code></span> </dd> </dl> <div class="param-desc"> <p>a class decorator method</p> </div> </div> </div> <div class="section-method"> <h4 class="name" id="~decorate"><span class="type-signature">(inner) </span>decorate<span class="signature">(metaProperty, target, key, descriptor)</span><span class="type-signature"></span></h4> <div class="description"> <p>Since the bulk functionality of @subscriptor, @mutator and</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="decorators_Resolvers.js.html">decorators/Resolvers.js</a>, <a href="decorators_Resolvers.js.html#line21">line 21</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>metaProperty</code></td> <td class="type"> <span class="param-type"><code>string</code></span> </td> <td class="description last"> <p>the name of the meta sub key under which to<br>store the modified decorated function.</p> </td> </tr> <tr> <td class="name"><code>target</code></td> <td class="type"> <span class="param-type"><code>Object</code></span> | <span class="param-type"><code>function</code></span> </td> <td class="description last"> <p>either the Class itself, if defined<br>on a static method, or the prototype if defined on an instance method</p> </td> </tr> <tr> <td class="name"><code>key</code></td> <td class="type"> <span class="param-type"><code>string</code></span> </td> <td class="description last"> <p>the property name of the function being decorated</p> </td> </tr> <tr> <td class="name"><code>descriptor</code></td> <td class="type"> <span class="param-type"><code>Object</code></span> </td> <td class="description last"> <p>a decorator descriptor; see<br><code>Object.defineProperty</code> for more information on descriptors</p> </td> </tr> </tbody> </table> </div> </article> </section> <section> <header> <h2> decorators </h2> </header> <article> <div class="container-overview"> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="decorators_Schema.js.html">decorators/Schema.js</a>, <a href="decorators_Schema.js.html#line15">line 15</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Members</h3> <div class="section-members"> <h4 class="name" id=".DirectTypeManager"><span class="type-signature">(static, constant) </span>DirectTypeManager<span class="type-signature"> :Object</span></h4> <div class="description"> <p>A small suite of functions a getter that allows easy manipulation of the<br>the DIRECT_TYPES workaround needed for some types of complex class<br>wrapping allowed by the @Getters and @Properties decorators. Namely the<br>ability to do something like @Getters('name', String) which would wrap the<br>contents of whatever is in the objects model in a String call.</p> <p>Direct types are those that need to be called without <code>new</code> in order for the<br>desired behavior to present itself.</p> </div> <dl class="details"> <dt class="tag-since">Since:</dt> <dd class="tag-since"><ul class="dummy"><li>2.7.0</li></ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="decorators_ModelProperties.js.html">decorators/ModelProperties.js</a>, <a href="decorators_ModelProperties.js.html#line250">line 250</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type"><code>Object</code></span> </li> </ul> </div> <h3 class="subsection-title">Methods</h3> <div class="section-method"> <h4 class="name" id=".%E2%8C%BE%E2%A0%80extractBits"><span class="type-signature">(static) </span>⌾⠀extractBits<span class="signature">(property)</span><span class="type-signature"> &rarr; {Object}</span></h4> <div class="description"> <p>For each of the decorators, Getters, Setters, and Properties, we take a<br>list of property names used to create the appropriate accessor types. In<br>some cases, however, the instance of GQLBase's data model may have a<br>different name. Finally if the return type for the getter should be wrapped<br>in a another GQLBase class type, we will need a way to specify those things<br>too.</p> <p>The <code>extractBits()</code> takes a single argument value from the decorator as it<br>parses them and converts it into an object, properly sorted, into values that<br>allow the above described behavior.</p> <p>Examples:</p> <p>```<br>// Create a class with a name and age property that map directly to the<br>// underlying data model</p> </div> <dl class="details"> <dt class="tag-since">Since:</dt> <dd class="tag-since"><ul class="dummy"><li>2.5</li></ul></dd>