1 | <!DOCTYPE html>
|
2 | <html lang="en">
|
3 | <head>
|
4 | <meta charset="utf-8">
|
5 | <meta name="viewport" content="width=device-width,initial-scale=1">
|
6 | <title>SyntaxTree - Documentation</title>
|
7 |
|
8 | <script src="scripts/prettify/prettify.js"></script>
|
9 | <script src="scripts/prettify/lang-css.js"></script>
|
10 | |
11 |
|
12 |
|
13 | <link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
|
14 | <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
15 | <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
16 | </head>
|
17 | <body>
|
18 |
|
19 | <input type="checkbox" id="nav-trigger" class="nav-trigger" />
|
20 | <label for="nav-trigger" class="navicon-button x">
|
21 | <div class="navicon"></div>
|
22 | </label>
|
23 |
|
24 | <label for="nav-trigger" class="overlay"></label>
|
25 |
|
26 | <nav>
|
27 | <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>
|
28 | </nav>
|
29 |
|
30 | <div id="main">
|
31 |
|
32 | <h1 class="page-title">SyntaxTree</h1>
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 | <section>
|
41 |
|
42 | <header>
|
43 |
|
44 | <h2>
|
45 | SyntaxTree
|
46 | </h2>
|
47 |
|
48 |
|
49 | </header>
|
50 |
|
51 | <article>
|
52 | <div class="container-overview">
|
53 |
|
54 |
|
55 | <div class="section-method">
|
56 |
|
57 |
|
58 |
|
59 | <h4 class="name" id="SyntaxTree"><span class="type-signature"></span>new SyntaxTree<span class="signature">()</span><span class="type-signature"></span></h4>
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 | <div class="description">
|
66 | <p>A parser and processor of GraphQL IDL Abstract Syntax Trees. Used to combine<br>a set of <a href="GQLBase.html"><code>GQLBase</code></a> class instances.</p>
|
67 | </div>
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 | <dl class="details">
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 |
|
100 | <dt class="tag-source">Source:</dt>
|
101 | <dd class="tag-source"><ul class="dummy"><li>
|
102 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line25">line 25</a>
|
103 | </li></ul></dd>
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 | </dl>
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 | </div>
|
136 |
|
137 | </div>
|
138 |
|
139 |
|
140 |
|
141 |
|
142 |
|
143 |
|
144 |
|
145 |
|
146 |
|
147 |
|
148 |
|
149 |
|
150 | <h3 class="subsection-title">Members</h3>
|
151 |
|
152 |
|
153 |
|
154 | <div class="section-members">
|
155 | <h4 class="name" id=".SUBSCRIPTION"><span class="type-signature">(static, constant) </span>SUBSCRIPTION<span class="type-signature"> :string</span></h4>
|
156 |
|
157 |
|
158 |
|
159 |
|
160 | <div class="description">
|
161 | <p>A runtime constant denoting a subscription type.</p>
|
162 | </div>
|
163 |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 | <dl class="details">
|
169 |
|
170 |
|
171 |
|
172 |
|
173 |
|
174 |
|
175 |
|
176 |
|
177 |
|
178 |
|
179 |
|
180 |
|
181 |
|
182 |
|
183 |
|
184 |
|
185 |
|
186 |
|
187 |
|
188 |
|
189 |
|
190 |
|
191 |
|
192 |
|
193 |
|
194 |
|
195 | <dt class="tag-source">Source:</dt>
|
196 | <dd class="tag-source"><ul class="dummy"><li>
|
197 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line481">line 481</a>
|
198 | </li></ul></dd>
|
199 |
|
200 |
|
201 |
|
202 |
|
203 |
|
204 |
|
205 |
|
206 | </dl>
|
207 |
|
208 |
|
209 |
|
210 | <h5>Type:</h5>
|
211 | <ul>
|
212 | <li>
|
213 |
|
214 | <span class="param-type"><code>string</code></span>
|
215 |
|
216 |
|
217 | </li>
|
218 | </ul>
|
219 |
|
220 |
|
221 |
|
222 |
|
223 |
|
224 | </div>
|
225 |
|
226 |
|
227 |
|
228 | <div class="section-members">
|
229 | <h4 class="name" id=".%E2%AC%87%EF%B8%8E%E2%A0%80MUTATION"><span class="type-signature">(static, constant) </span>⬇︎⠀MUTATION<span class="type-signature"> :string</span></h4>
|
230 |
|
231 |
|
232 |
|
233 |
|
234 | <div class="description">
|
235 | <p>A runtime constant denoting a mutation type.</p>
|
236 | </div>
|
237 |
|
238 |
|
239 |
|
240 |
|
241 |
|
242 | <dl class="details">
|
243 |
|
244 |
|
245 |
|
246 |
|
247 |
|
248 |
|
249 |
|
250 |
|
251 |
|
252 |
|
253 |
|
254 |
|
255 |
|
256 |
|
257 |
|
258 |
|
259 |
|
260 |
|
261 |
|
262 |
|
263 |
|
264 |
|
265 |
|
266 |
|
267 |
|
268 |
|
269 | <dt class="tag-source">Source:</dt>
|
270 | <dd class="tag-source"><ul class="dummy"><li>
|
271 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line469">line 469</a>
|
272 | </li></ul></dd>
|
273 |
|
274 |
|
275 |
|
276 |
|
277 |
|
278 |
|
279 |
|
280 | </dl>
|
281 |
|
282 |
|
283 |
|
284 | <h5>Type:</h5>
|
285 | <ul>
|
286 | <li>
|
287 |
|
288 | <span class="param-type"><code>string</code></span>
|
289 |
|
290 |
|
291 | </li>
|
292 | </ul>
|
293 |
|
294 |
|
295 |
|
296 |
|
297 |
|
298 | </div>
|
299 |
|
300 |
|
301 |
|
302 | <div class="section-members">
|
303 | <h4 class="name" id=".%E2%AC%87%EF%B8%8E%E2%A0%80QUERY"><span class="type-signature">(static, constant) </span>⬇︎⠀QUERY<span class="type-signature"> :string</span></h4>
|
304 |
|
305 |
|
306 |
|
307 |
|
308 | <div class="description">
|
309 | <p>A runtime constant denoting a query type.</p>
|
310 | </div>
|
311 |
|
312 |
|
313 |
|
314 |
|
315 |
|
316 | <dl class="details">
|
317 |
|
318 |
|
319 |
|
320 |
|
321 |
|
322 |
|
323 |
|
324 |
|
325 |
|
326 |
|
327 |
|
328 |
|
329 |
|
330 |
|
331 |
|
332 |
|
333 |
|
334 |
|
335 |
|
336 |
|
337 |
|
338 |
|
339 |
|
340 |
|
341 |
|
342 |
|
343 | <dt class="tag-source">Source:</dt>
|
344 | <dd class="tag-source"><ul class="dummy"><li>
|
345 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line457">line 457</a>
|
346 | </li></ul></dd>
|
347 |
|
348 |
|
349 |
|
350 |
|
351 |
|
352 |
|
353 |
|
354 | </dl>
|
355 |
|
356 |
|
357 |
|
358 | <h5>Type:</h5>
|
359 | <ul>
|
360 | <li>
|
361 |
|
362 | <span class="param-type"><code>string</code></span>
|
363 |
|
364 |
|
365 | </li>
|
366 | </ul>
|
367 |
|
368 |
|
369 |
|
370 |
|
371 |
|
372 | </div>
|
373 |
|
374 |
|
375 |
|
376 |
|
377 |
|
378 | <h3 class="subsection-title">Methods</h3>
|
379 |
|
380 |
|
381 |
|
382 | <div class="section-method">
|
383 |
|
384 |
|
385 |
|
386 | <h4 class="name" id=".%E2%8C%BE%E2%A0%80EmptyDocument"><span class="type-signature">(static) </span>⌾⠀EmptyDocument<span class="signature">(schemaOrASTOrST)</span><span class="type-signature"> → {<a href="SyntaxTree.html">SyntaxTree</a>}</span></h4>
|
387 |
|
388 |
|
389 |
|
390 |
|
391 |
|
392 | <div class="description">
|
393 | <p>The starting point for a SyntaxTree that will be built up programmatically.</p>
|
394 | </div>
|
395 |
|
396 |
|
397 |
|
398 |
|
399 |
|
400 | <dl class="details">
|
401 |
|
402 |
|
403 |
|
404 |
|
405 |
|
406 |
|
407 |
|
408 |
|
409 |
|
410 |
|
411 |
|
412 |
|
413 |
|
414 |
|
415 |
|
416 |
|
417 |
|
418 |
|
419 |
|
420 |
|
421 |
|
422 |
|
423 |
|
424 |
|
425 |
|
426 |
|
427 | <dt class="tag-source">Source:</dt>
|
428 | <dd class="tag-source"><ul class="dummy"><li>
|
429 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line787">line 787</a>
|
430 | </li></ul></dd>
|
431 |
|
432 |
|
433 |
|
434 |
|
435 |
|
436 |
|
437 |
|
438 | </dl>
|
439 |
|
440 |
|
441 |
|
442 |
|
443 |
|
444 |
|
445 |
|
446 |
|
447 |
|
448 | <h5>Parameters:</h5>
|
449 |
|
450 |
|
451 | <table class="params">
|
452 | <thead>
|
453 | <tr>
|
454 |
|
455 | <th>Name</th>
|
456 |
|
457 |
|
458 | <th>Type</th>
|
459 |
|
460 |
|
461 |
|
462 |
|
463 |
|
464 | <th class="last">Description</th>
|
465 | </tr>
|
466 | </thead>
|
467 |
|
468 | <tbody>
|
469 |
|
470 |
|
471 | <tr>
|
472 |
|
473 | <td class="name"><code>schemaOrASTOrST</code></td>
|
474 |
|
475 |
|
476 | <td class="type">
|
477 |
|
478 |
|
479 | <span class="param-type"><code>string</code></span>
|
480 | |
|
481 |
|
482 | <span class="param-type"><code>Object</code></span>
|
483 | |
|
484 |
|
485 | <span class="param-type"><code><a href="SyntaxTree.html">SyntaxTree</a></code></span>
|
486 |
|
487 |
|
488 |
|
489 | </td>
|
490 |
|
491 |
|
492 |
|
493 |
|
494 |
|
495 | <td class="description last">
|
496 | <p>any valid type taken by<br>SyntaxTree.from() used to further populate the new empty document</p>
|
497 |
|
498 | </td>
|
499 | </tr>
|
500 |
|
501 |
|
502 | </tbody>
|
503 | </table>
|
504 |
|
505 |
|
506 |
|
507 |
|
508 |
|
509 |
|
510 |
|
511 |
|
512 |
|
513 |
|
514 |
|
515 |
|
516 |
|
517 |
|
518 | <div class="section-returns">
|
519 | <h5>Returns:</h5>
|
520 |
|
521 |
|
522 |
|
523 | <dl class="param-type">
|
524 | <dt>
|
525 | Type:
|
526 | </dt>
|
527 | <dd>
|
528 |
|
529 | <span class="param-type"><code><a href="SyntaxTree.html">SyntaxTree</a></code></span>
|
530 |
|
531 |
|
532 | </dd>
|
533 | </dl>
|
534 |
|
535 |
|
536 | <div class="param-desc">
|
537 | <p>an instance of SyntaxTree with no definitions and a<br>kind set to 'Document'</p>
|
538 | </div>
|
539 |
|
540 |
|
541 | </div>
|
542 |
|
543 |
|
544 |
|
545 | </div>
|
546 |
|
547 |
|
548 | <div class="section-method">
|
549 |
|
550 |
|
551 |
|
552 | <h4 class="name" id=".%E2%8C%BE%E2%A0%80EmptyMutation"><span class="type-signature">(static) </span>⌾⠀EmptyMutation<span class="signature">()</span><span class="type-signature"> → {<a href="SyntaxTree.html">SyntaxTree</a>}</span></h4>
|
553 |
|
554 |
|
555 |
|
556 |
|
557 |
|
558 | <div class="description">
|
559 | <p>Mutation types in GraphQL are an ObjectTypeDefinition of importance for<br>placement on the root object. There is utility in creating an empty<br>one that can be injected with the fields of other GraphQL object mutation<br>entries.</p>
|
560 | </div>
|
561 |
|
562 |
|
563 |
|
564 |
|
565 |
|
566 | <dl class="details">
|
567 |
|
568 |
|
569 |
|
570 |
|
571 |
|
572 |
|
573 |
|
574 |
|
575 |
|
576 |
|
577 |
|
578 |
|
579 |
|
580 |
|
581 |
|
582 |
|
583 |
|
584 |
|
585 |
|
586 |
|
587 |
|
588 |
|
589 |
|
590 |
|
591 |
|
592 |
|
593 | <dt class="tag-source">Source:</dt>
|
594 | <dd class="tag-source"><ul class="dummy"><li>
|
595 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line770">line 770</a>
|
596 | </li></ul></dd>
|
597 |
|
598 |
|
599 |
|
600 |
|
601 |
|
602 |
|
603 |
|
604 | </dl>
|
605 |
|
606 |
|
607 |
|
608 |
|
609 |
|
610 |
|
611 |
|
612 |
|
613 |
|
614 |
|
615 |
|
616 |
|
617 |
|
618 |
|
619 |
|
620 |
|
621 |
|
622 |
|
623 |
|
624 |
|
625 |
|
626 | <div class="section-returns">
|
627 | <h5>Returns:</h5>
|
628 |
|
629 |
|
630 |
|
631 | <dl class="param-type">
|
632 | <dt>
|
633 | Type:
|
634 | </dt>
|
635 | <dd>
|
636 |
|
637 | <span class="param-type"><code><a href="SyntaxTree.html">SyntaxTree</a></code></span>
|
638 |
|
639 |
|
640 | </dd>
|
641 | </dl>
|
642 |
|
643 |
|
644 | <div class="param-desc">
|
645 | <p>an instance of SyntaxTree with a base AST generated<br>by parsing the graph query, "type Mutation {}"</p>
|
646 | </div>
|
647 |
|
648 |
|
649 | </div>
|
650 |
|
651 |
|
652 |
|
653 | </div>
|
654 |
|
655 |
|
656 | <div class="section-method">
|
657 |
|
658 |
|
659 |
|
660 | <h4 class="name" id=".%E2%8C%BE%E2%A0%80EmptyQuery"><span class="type-signature">(static) </span>⌾⠀EmptyQuery<span class="signature">()</span><span class="type-signature"> → {<a href="SyntaxTree.html">SyntaxTree</a>}</span></h4>
|
661 |
|
662 |
|
663 |
|
664 |
|
665 |
|
666 | <div class="description">
|
667 | <p>Query types in GraphQL are an ObjectTypeDefinition of importance for<br>placement on the root object. There is utility in creating an empty<br>one that can be injected with the fields of other GraphQL object query<br>entries.</p>
|
668 | </div>
|
669 |
|
670 |
|
671 |
|
672 |
|
673 |
|
674 | <dl class="details">
|
675 |
|
676 |
|
677 |
|
678 |
|
679 |
|
680 |
|
681 |
|
682 |
|
683 |
|
684 |
|
685 |
|
686 |
|
687 |
|
688 |
|
689 |
|
690 |
|
691 |
|
692 |
|
693 |
|
694 |
|
695 |
|
696 |
|
697 |
|
698 |
|
699 |
|
700 |
|
701 | <dt class="tag-source">Source:</dt>
|
702 | <dd class="tag-source"><ul class="dummy"><li>
|
703 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line753">line 753</a>
|
704 | </li></ul></dd>
|
705 |
|
706 |
|
707 |
|
708 |
|
709 |
|
710 |
|
711 |
|
712 | </dl>
|
713 |
|
714 |
|
715 |
|
716 |
|
717 |
|
718 |
|
719 |
|
720 |
|
721 |
|
722 |
|
723 |
|
724 |
|
725 |
|
726 |
|
727 |
|
728 |
|
729 |
|
730 |
|
731 |
|
732 |
|
733 |
|
734 | <div class="section-returns">
|
735 | <h5>Returns:</h5>
|
736 |
|
737 |
|
738 |
|
739 | <dl class="param-type">
|
740 | <dt>
|
741 | Type:
|
742 | </dt>
|
743 | <dd>
|
744 |
|
745 | <span class="param-type"><code><a href="SyntaxTree.html">SyntaxTree</a></code></span>
|
746 |
|
747 |
|
748 | </dd>
|
749 | </dl>
|
750 |
|
751 |
|
752 | <div class="param-desc">
|
753 | <p>an instance of SyntaxTree with a base AST generated<br>by parsing the graph query, "type Query {}"</p>
|
754 | </div>
|
755 |
|
756 |
|
757 | </div>
|
758 |
|
759 |
|
760 |
|
761 | </div>
|
762 |
|
763 |
|
764 | <div class="section-method">
|
765 |
|
766 |
|
767 |
|
768 | <h4 class="name" id=".%E2%8C%BE%E2%A0%80findDefinition"><span class="type-signature">(static) </span>⌾⠀findDefinition<span class="signature">(ast, definitionName)</span><span class="type-signature"> → {Object|null}</span></h4>
|
769 |
|
770 |
|
771 |
|
772 |
|
773 |
|
774 | <div class="description">
|
775 | <p>Iterate through the definitions of the AST if there are any. For each<br>definition the name property's value field is compared to the supplied<br>definitionName. The definitionName can be a string or a regular<br>expression if finer granularity is desired.</p>
|
776 | </div>
|
777 |
|
778 |
|
779 |
|
780 |
|
781 |
|
782 | <dl class="details">
|
783 |
|
784 |
|
785 |
|
786 |
|
787 |
|
788 |
|
789 |
|
790 |
|
791 |
|
792 |
|
793 |
|
794 |
|
795 |
|
796 |
|
797 |
|
798 |
|
799 |
|
800 |
|
801 |
|
802 |
|
803 |
|
804 |
|
805 |
|
806 |
|
807 |
|
808 |
|
809 | <dt class="tag-source">Source:</dt>
|
810 | <dd class="tag-source"><ul class="dummy"><li>
|
811 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line599">line 599</a>
|
812 | </li></ul></dd>
|
813 |
|
814 |
|
815 |
|
816 |
|
817 |
|
818 |
|
819 |
|
820 | </dl>
|
821 |
|
822 |
|
823 |
|
824 |
|
825 |
|
826 |
|
827 |
|
828 |
|
829 |
|
830 | <h5>Parameters:</h5>
|
831 |
|
832 |
|
833 | <table class="params">
|
834 | <thead>
|
835 | <tr>
|
836 |
|
837 | <th>Name</th>
|
838 |
|
839 |
|
840 | <th>Type</th>
|
841 |
|
842 |
|
843 |
|
844 |
|
845 |
|
846 | <th class="last">Description</th>
|
847 | </tr>
|
848 | </thead>
|
849 |
|
850 | <tbody>
|
851 |
|
852 |
|
853 | <tr>
|
854 |
|
855 | <td class="name"><code>ast</code></td>
|
856 |
|
857 |
|
858 | <td class="type">
|
859 |
|
860 |
|
861 | <span class="param-type"><code>Object</code></span>
|
862 |
|
863 |
|
864 |
|
865 | </td>
|
866 |
|
867 |
|
868 |
|
869 |
|
870 |
|
871 | <td class="description last">
|
872 | <p>an abstract syntax tree object created from a GQL SDL</p>
|
873 |
|
874 | </td>
|
875 | </tr>
|
876 |
|
877 |
|
878 |
|
879 | <tr>
|
880 |
|
881 | <td class="name"><code>definitionName</code></td>
|
882 |
|
883 |
|
884 | <td class="type">
|
885 |
|
886 |
|
887 | <span class="param-type"><code>string</code></span>
|
888 | |
|
889 |
|
890 | <span class="param-type"><code>RegExp</code></span>
|
891 |
|
892 |
|
893 |
|
894 | </td>
|
895 |
|
896 |
|
897 |
|
898 |
|
899 |
|
900 | <td class="description last">
|
901 | <p>a string or regular expression used<br>to match against the definition name field in a given AST.</p>
|
902 |
|
903 | </td>
|
904 | </tr>
|
905 |
|
906 |
|
907 | </tbody>
|
908 | </table>
|
909 |
|
910 |
|
911 |
|
912 |
|
913 |
|
914 |
|
915 |
|
916 |
|
917 |
|
918 |
|
919 |
|
920 |
|
921 |
|
922 |
|
923 | <div class="section-returns">
|
924 | <h5>Returns:</h5>
|
925 |
|
926 |
|
927 |
|
928 | <dl class="param-type">
|
929 | <dt>
|
930 | Type:
|
931 | </dt>
|
932 | <dd>
|
933 |
|
934 | <span class="param-type"><code>Object</code></span>
|
935 | |
|
936 |
|
937 | <span class="param-type"><code>null</code></span>
|
938 |
|
939 |
|
940 | </dd>
|
941 | </dl>
|
942 |
|
943 |
|
944 | <div class="param-desc">
|
945 | <p>a reference to the internal definition field or<br>null if one with a matching name could not be found.</p>
|
946 | </div>
|
947 |
|
948 |
|
949 | </div>
|
950 |
|
951 |
|
952 |
|
953 | </div>
|
954 |
|
955 |
|
956 | <div class="section-method">
|
957 |
|
958 |
|
959 |
|
960 | <h4 class="name" id=".%E2%8C%BE%E2%A0%80findField"><span class="type-signature">(static) </span>⌾⠀findField<span class="signature">(ast, definitionName, fieldName)</span><span class="type-signature"> → {Object|null}</span></h4>
|
961 |
|
962 |
|
963 |
|
964 |
|
965 |
|
966 | <div class="description">
|
967 | <p>Iterate through the fields of a definition AST if there are any. For each<br>field, the name property's value field is compared to the supplied<br>fieldName. The fieldName can be a string or a regular expression if<br>finer granularity is desired.</p>
|
968 | <p>Before iterating over the fields, however, the definition is found using<br><code>SyntaxTree#findDefinition</code>. If either the field or definition are not<br>found, null is returned.</p>
|
969 | </div>
|
970 |
|
971 |
|
972 |
|
973 |
|
974 |
|
975 | <dl class="details">
|
976 |
|
977 |
|
978 |
|
979 |
|
980 | <dt class="tag-since">Since:</dt>
|
981 | <dd class="tag-since"><ul class="dummy"><li>2.7.0</li></ul></dd>
|
982 |
|
983 |
|
984 |
|
985 |
|
986 |
|
987 |
|
988 |
|
989 |
|
990 |
|
991 |
|
992 |
|
993 |
|
994 |
|
995 |
|
996 |
|
997 |
|
998 |
|
999 |
|
1000 |
|
1001 |
|
1002 |
|
1003 |
|
1004 |
|
1005 | <dt class="tag-source">Source:</dt>
|
1006 | <dd class="tag-source"><ul class="dummy"><li>
|
1007 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line622">line 622</a>
|
1008 | </li></ul></dd>
|
1009 |
|
1010 |
|
1011 |
|
1012 |
|
1013 |
|
1014 |
|
1015 |
|
1016 | </dl>
|
1017 |
|
1018 |
|
1019 |
|
1020 |
|
1021 |
|
1022 |
|
1023 |
|
1024 |
|
1025 |
|
1026 | <h5>Parameters:</h5>
|
1027 |
|
1028 |
|
1029 | <table class="params">
|
1030 | <thead>
|
1031 | <tr>
|
1032 |
|
1033 | <th>Name</th>
|
1034 |
|
1035 |
|
1036 | <th>Type</th>
|
1037 |
|
1038 |
|
1039 |
|
1040 |
|
1041 |
|
1042 | <th class="last">Description</th>
|
1043 | </tr>
|
1044 | </thead>
|
1045 |
|
1046 | <tbody>
|
1047 |
|
1048 |
|
1049 | <tr>
|
1050 |
|
1051 | <td class="name"><code>ast</code></td>
|
1052 |
|
1053 |
|
1054 | <td class="type">
|
1055 |
|
1056 |
|
1057 | <span class="param-type"><code>Object</code></span>
|
1058 |
|
1059 |
|
1060 |
|
1061 | </td>
|
1062 |
|
1063 |
|
1064 |
|
1065 |
|
1066 |
|
1067 | <td class="description last">
|
1068 | <p>an abstract syntax tree object created from a GQL SDL</p>
|
1069 |
|
1070 | </td>
|
1071 | </tr>
|
1072 |
|
1073 |
|
1074 |
|
1075 | <tr>
|
1076 |
|
1077 | <td class="name"><code>definitionName</code></td>
|
1078 |
|
1079 |
|
1080 | <td class="type">
|
1081 |
|
1082 |
|
1083 | <span class="param-type"><code>string</code></span>
|
1084 | |
|
1085 |
|
1086 | <span class="param-type"><code>RegExp</code></span>
|
1087 |
|
1088 |
|
1089 |
|
1090 | </td>
|
1091 |
|
1092 |
|
1093 |
|
1094 |
|
1095 |
|
1096 | <td class="description last">
|
1097 | <p>a string or regular expression used<br>to match against the definition name field in a given AST.</p>
|
1098 |
|
1099 | </td>
|
1100 | </tr>
|
1101 |
|
1102 |
|
1103 |
|
1104 | <tr>
|
1105 |
|
1106 | <td class="name"><code>fieldName</code></td>
|
1107 |
|
1108 |
|
1109 | <td class="type">
|
1110 |
|
1111 |
|
1112 | <span class="param-type"><code>string</code></span>
|
1113 | |
|
1114 |
|
1115 | <span class="param-type"><code>RegExp</code></span>
|
1116 |
|
1117 |
|
1118 |
|
1119 | </td>
|
1120 |
|
1121 |
|
1122 |
|
1123 |
|
1124 |
|
1125 | <td class="description last">
|
1126 | <p>a string or regular expression used<br>to match against the field name field in a given AST.</p>
|
1127 |
|
1128 | </td>
|
1129 | </tr>
|
1130 |
|
1131 |
|
1132 | </tbody>
|
1133 | </table>
|
1134 |
|
1135 |
|
1136 |
|
1137 |
|
1138 |
|
1139 |
|
1140 |
|
1141 |
|
1142 |
|
1143 |
|
1144 |
|
1145 |
|
1146 |
|
1147 |
|
1148 | <div class="section-returns">
|
1149 | <h5>Returns:</h5>
|
1150 |
|
1151 |
|
1152 |
|
1153 | <dl class="param-type">
|
1154 | <dt>
|
1155 | Type:
|
1156 | </dt>
|
1157 | <dd>
|
1158 |
|
1159 | <span class="param-type"><code>Object</code></span>
|
1160 | |
|
1161 |
|
1162 | <span class="param-type"><code>null</code></span>
|
1163 |
|
1164 |
|
1165 | </dd>
|
1166 | </dl>
|
1167 |
|
1168 |
|
1169 | <div class="param-desc">
|
1170 | <p>an object containing two keys, the first being<br><code>field</code> which points to the requested AST definition field. The second<br>being <code>meta</code> which contains three commonly requested bits of data; <code>name</code>,<br><code>type</code> and <code>nullable</code>. Non-nullable fields have their actual type wrapped<br>in a <code>NonNullType</code> GraphQL construct. The actual field type is contained<br>within. The meta object surfaces those values for easy use.</p>
|
1171 | </div>
|
1172 |
|
1173 |
|
1174 | </div>
|
1175 |
|
1176 |
|
1177 |
|
1178 | </div>
|
1179 |
|
1180 |
|
1181 | <div class="section-method">
|
1182 |
|
1183 |
|
1184 |
|
1185 | <h4 class="name" id=".%E2%8C%BE%E2%A0%80findInASTArrayByNameValue"><span class="type-signature">(static) </span>⌾⠀findInASTArrayByNameValue<span class="signature">(array, name)</span><span class="type-signature"> → {Object|null}</span></h4>
|
1186 |
|
1187 |
|
1188 |
|
1189 |
|
1190 |
|
1191 | <div class="description">
|
1192 | <p>A lot of searching in ASTs is filtering through arrays and matching on<br>subobject properties on each iteration. A common theme is find something<br>by its <code>.name.value</code>. This method simplifies that by taking an array of<br>AST nodes and searching them for a <code>.name.value</code> property that exists<br>within.</p>
|
1193 | </div>
|
1194 |
|
1195 |
|
1196 |
|
1197 |
|
1198 |
|
1199 | <dl class="details">
|
1200 |
|
1201 |
|
1202 |
|
1203 |
|
1204 | <dt class="tag-since">Since:</dt>
|
1205 | <dd class="tag-since"><ul class="dummy"><li>2.7.0</li></ul></dd>
|
1206 |
|
1207 |
|
1208 |
|
1209 |
|
1210 |
|
1211 |
|
1212 |
|
1213 |
|
1214 |
|
1215 |
|
1216 |
|
1217 |
|
1218 |
|
1219 |
|
1220 |
|
1221 |
|
1222 |
|
1223 |
|
1224 |
|
1225 |
|
1226 |
|
1227 |
|
1228 |
|
1229 | <dt class="tag-source">Source:</dt>
|
1230 | <dd class="tag-source"><ul class="dummy"><li>
|
1231 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line714">line 714</a>
|
1232 | </li></ul></dd>
|
1233 |
|
1234 |
|
1235 |
|
1236 |
|
1237 |
|
1238 |
|
1239 |
|
1240 | </dl>
|
1241 |
|
1242 |
|
1243 |
|
1244 |
|
1245 |
|
1246 |
|
1247 |
|
1248 |
|
1249 |
|
1250 | <h5>Parameters:</h5>
|
1251 |
|
1252 |
|
1253 | <table class="params">
|
1254 | <thead>
|
1255 | <tr>
|
1256 |
|
1257 | <th>Name</th>
|
1258 |
|
1259 |
|
1260 | <th>Type</th>
|
1261 |
|
1262 |
|
1263 |
|
1264 |
|
1265 |
|
1266 | <th class="last">Description</th>
|
1267 | </tr>
|
1268 | </thead>
|
1269 |
|
1270 | <tbody>
|
1271 |
|
1272 |
|
1273 | <tr>
|
1274 |
|
1275 | <td class="name"><code>array</code></td>
|
1276 |
|
1277 |
|
1278 | <td class="type">
|
1279 |
|
1280 |
|
1281 | <span class="param-type"><code>Array</code></span>
|
1282 |
|
1283 |
|
1284 |
|
1285 | </td>
|
1286 |
|
1287 |
|
1288 |
|
1289 |
|
1290 |
|
1291 | <td class="description last">
|
1292 | <p>of mixed AST object nodes containing <code>name.value</code>s</p>
|
1293 |
|
1294 | </td>
|
1295 | </tr>
|
1296 |
|
1297 |
|
1298 |
|
1299 | <tr>
|
1300 |
|
1301 | <td class="name"><code>name</code></td>
|
1302 |
|
1303 |
|
1304 | <td class="type">
|
1305 |
|
1306 |
|
1307 | <span class="param-type"><code>string</code></span>
|
1308 | |
|
1309 |
|
1310 | <span class="param-type"><code>RegExp</code></span>
|
1311 |
|
1312 |
|
1313 |
|
1314 | </td>
|
1315 |
|
1316 |
|
1317 |
|
1318 |
|
1319 |
|
1320 | <td class="description last">
|
1321 | <p>a string or regular expression used<br>to match against the node name value</p>
|
1322 |
|
1323 | </td>
|
1324 | </tr>
|
1325 |
|
1326 |
|
1327 | </tbody>
|
1328 | </table>
|
1329 |
|
1330 |
|
1331 |
|
1332 |
|
1333 |
|
1334 |
|
1335 |
|
1336 |
|
1337 |
|
1338 |
|
1339 |
|
1340 |
|
1341 |
|
1342 |
|
1343 | <div class="section-returns">
|
1344 | <h5>Returns:</h5>
|
1345 |
|
1346 |
|
1347 |
|
1348 | <dl class="param-type">
|
1349 | <dt>
|
1350 | Type:
|
1351 | </dt>
|
1352 | <dd>
|
1353 |
|
1354 | <span class="param-type"><code>Object</code></span>
|
1355 | |
|
1356 |
|
1357 | <span class="param-type"><code>null</code></span>
|
1358 |
|
1359 |
|
1360 | </dd>
|
1361 | </dl>
|
1362 |
|
1363 |
|
1364 | <div class="param-desc">
|
1365 | <p>the AST leaf if one matches or null otherwise.</p>
|
1366 | </div>
|
1367 |
|
1368 |
|
1369 | </div>
|
1370 |
|
1371 |
|
1372 |
|
1373 | </div>
|
1374 |
|
1375 |
|
1376 | <div class="section-method">
|
1377 |
|
1378 |
|
1379 |
|
1380 | <h4 class="name" id=".%E2%8C%BE%E2%A0%80from"><span class="type-signature">(static) </span>⌾⠀from<span class="signature">(mixed)</span><span class="type-signature"> → {<a href="SyntaxTree.html">SyntaxTree</a>}</span></h4>
|
1381 |
|
1382 |
|
1383 |
|
1384 |
|
1385 |
|
1386 | <div class="description">
|
1387 | <p>Given one of, a valid GraphQL IDL schema string, a valid GraphQL AST or<br>an instance of SyntaxTree, the static from() method will create a new<br>instance of the SyntaxTree with the values you provide.</p>
|
1388 | </div>
|
1389 |
|
1390 |
|
1391 |
|
1392 |
|
1393 |
|
1394 | <dl class="details">
|
1395 |
|
1396 |
|
1397 |
|
1398 |
|
1399 |
|
1400 |
|
1401 |
|
1402 |
|
1403 |
|
1404 |
|
1405 |
|
1406 |
|
1407 |
|
1408 |
|
1409 |
|
1410 |
|
1411 |
|
1412 |
|
1413 |
|
1414 |
|
1415 |
|
1416 |
|
1417 |
|
1418 |
|
1419 |
|
1420 |
|
1421 | <dt class="tag-source">Source:</dt>
|
1422 | <dd class="tag-source"><ul class="dummy"><li>
|
1423 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line520">line 520</a>
|
1424 | </li></ul></dd>
|
1425 |
|
1426 |
|
1427 |
|
1428 |
|
1429 |
|
1430 |
|
1431 |
|
1432 | </dl>
|
1433 |
|
1434 |
|
1435 |
|
1436 |
|
1437 |
|
1438 |
|
1439 |
|
1440 |
|
1441 |
|
1442 | <h5>Parameters:</h5>
|
1443 |
|
1444 |
|
1445 | <table class="params">
|
1446 | <thead>
|
1447 | <tr>
|
1448 |
|
1449 | <th>Name</th>
|
1450 |
|
1451 |
|
1452 | <th>Type</th>
|
1453 |
|
1454 |
|
1455 |
|
1456 |
|
1457 |
|
1458 | <th class="last">Description</th>
|
1459 | </tr>
|
1460 | </thead>
|
1461 |
|
1462 | <tbody>
|
1463 |
|
1464 |
|
1465 | <tr>
|
1466 |
|
1467 | <td class="name"><code>mixed</code></td>
|
1468 |
|
1469 |
|
1470 | <td class="type">
|
1471 |
|
1472 |
|
1473 | <span class="param-type"><code>String</code></span>
|
1474 | |
|
1475 |
|
1476 | <span class="param-type"><code>Object</code></span>
|
1477 | |
|
1478 |
|
1479 | <span class="param-type"><code><a href="SyntaxTree.html">SyntaxTree</a></code></span>
|
1480 |
|
1481 |
|
1482 |
|
1483 | </td>
|
1484 |
|
1485 |
|
1486 |
|
1487 |
|
1488 |
|
1489 | <td class="description last">
|
1490 | <p>an instance of one of the valid<br>types specified above. Everything else will result in a null value.</p>
|
1491 |
|
1492 | </td>
|
1493 | </tr>
|
1494 |
|
1495 |
|
1496 | </tbody>
|
1497 | </table>
|
1498 |
|
1499 |
|
1500 |
|
1501 |
|
1502 |
|
1503 |
|
1504 |
|
1505 |
|
1506 |
|
1507 |
|
1508 |
|
1509 |
|
1510 |
|
1511 |
|
1512 | <div class="section-returns">
|
1513 | <h5>Returns:</h5>
|
1514 |
|
1515 |
|
1516 |
|
1517 | <dl class="param-type">
|
1518 | <dt>
|
1519 | Type:
|
1520 | </dt>
|
1521 | <dd>
|
1522 |
|
1523 | <span class="param-type"><code><a href="SyntaxTree.html">SyntaxTree</a></code></span>
|
1524 |
|
1525 |
|
1526 | </dd>
|
1527 | </dl>
|
1528 |
|
1529 |
|
1530 | <div class="param-desc">
|
1531 | <p>a newly created and populated instance of SyntaxTree<br>or null if an invalid type was supplied for mixed.</p>
|
1532 | </div>
|
1533 |
|
1534 |
|
1535 | </div>
|
1536 |
|
1537 |
|
1538 |
|
1539 | </div>
|
1540 |
|
1541 |
|
1542 | <div class="section-method">
|
1543 |
|
1544 |
|
1545 |
|
1546 | <h4 class="name" id=".%E2%8C%BE%E2%A0%80fromAST"><span class="type-signature">(static) </span>⌾⠀fromAST<span class="signature">(ast)</span><span class="type-signature"> → {<a href="SyntaxTree.html">SyntaxTree</a>}</span></h4>
|
1547 |
|
1548 |
|
1549 |
|
1550 |
|
1551 |
|
1552 | <div class="description">
|
1553 | <p>Generates a new instance of SyntaxTree from the supplied, valid, GraphQL<br>schema. This method does not perform try/catch validation and if an<br>invalid GraphQL schema is supplied an error will be thrown.</p>
|
1554 | </div>
|
1555 |
|
1556 |
|
1557 |
|
1558 |
|
1559 |
|
1560 | <dl class="details">
|
1561 |
|
1562 |
|
1563 |
|
1564 |
|
1565 |
|
1566 |
|
1567 |
|
1568 |
|
1569 |
|
1570 |
|
1571 |
|
1572 |
|
1573 |
|
1574 |
|
1575 |
|
1576 |
|
1577 |
|
1578 |
|
1579 |
|
1580 |
|
1581 |
|
1582 |
|
1583 |
|
1584 |
|
1585 |
|
1586 |
|
1587 | <dt class="tag-source">Source:</dt>
|
1588 | <dd class="tag-source"><ul class="dummy"><li>
|
1589 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line578">line 578</a>
|
1590 | </li></ul></dd>
|
1591 |
|
1592 |
|
1593 |
|
1594 |
|
1595 |
|
1596 |
|
1597 |
|
1598 | </dl>
|
1599 |
|
1600 |
|
1601 |
|
1602 |
|
1603 |
|
1604 |
|
1605 |
|
1606 |
|
1607 |
|
1608 | <h5>Parameters:</h5>
|
1609 |
|
1610 |
|
1611 | <table class="params">
|
1612 | <thead>
|
1613 | <tr>
|
1614 |
|
1615 | <th>Name</th>
|
1616 |
|
1617 |
|
1618 | <th>Type</th>
|
1619 |
|
1620 |
|
1621 |
|
1622 |
|
1623 |
|
1624 | <th class="last">Description</th>
|
1625 | </tr>
|
1626 | </thead>
|
1627 |
|
1628 | <tbody>
|
1629 |
|
1630 |
|
1631 | <tr>
|
1632 |
|
1633 | <td class="name"><code>ast</code></td>
|
1634 |
|
1635 |
|
1636 | <td class="type">
|
1637 |
|
1638 |
|
1639 | <span class="param-type"><code>object</code></span>
|
1640 |
|
1641 |
|
1642 |
|
1643 | </td>
|
1644 |
|
1645 |
|
1646 |
|
1647 |
|
1648 |
|
1649 | <td class="description last">
|
1650 | <p>a valid GraphQL AST object.</p>
|
1651 |
|
1652 | </td>
|
1653 | </tr>
|
1654 |
|
1655 |
|
1656 | </tbody>
|
1657 | </table>
|
1658 |
|
1659 |
|
1660 |
|
1661 |
|
1662 |
|
1663 |
|
1664 |
|
1665 |
|
1666 |
|
1667 |
|
1668 |
|
1669 |
|
1670 |
|
1671 |
|
1672 | <div class="section-returns">
|
1673 | <h5>Returns:</h5>
|
1674 |
|
1675 |
|
1676 |
|
1677 | <dl class="param-type">
|
1678 | <dt>
|
1679 | Type:
|
1680 | </dt>
|
1681 | <dd>
|
1682 |
|
1683 | <span class="param-type"><code><a href="SyntaxTree.html">SyntaxTree</a></code></span>
|
1684 |
|
1685 |
|
1686 | </dd>
|
1687 | </dl>
|
1688 |
|
1689 |
|
1690 | <div class="param-desc">
|
1691 | <p>a new instance of SyntaxTree initialized with a<br>supplied abstract syntax tree generated by require('graphql').parse() or<br>other compatible method.</p>
|
1692 | </div>
|
1693 |
|
1694 |
|
1695 | </div>
|
1696 |
|
1697 |
|
1698 |
|
1699 | </div>
|
1700 |
|
1701 |
|
1702 | <div class="section-method">
|
1703 |
|
1704 |
|
1705 |
|
1706 | <h4 class="name" id=".%E2%8C%BE%E2%A0%80fromSchema"><span class="type-signature">(static) </span>⌾⠀fromSchema<span class="signature">(schema)</span><span class="type-signature"> → {<a href="SyntaxTree.html">SyntaxTree</a>}</span></h4>
|
1707 |
|
1708 |
|
1709 |
|
1710 |
|
1711 |
|
1712 | <div class="description">
|
1713 | <p>Generates a new instance of SyntaxTree from the supplied, valid, GraphQL<br>schema. This method does not perform try/catch validation and if an<br>invalid GraphQL schema is supplied an error will be thrown.</p>
|
1714 | </div>
|
1715 |
|
1716 |
|
1717 |
|
1718 |
|
1719 |
|
1720 | <dl class="details">
|
1721 |
|
1722 |
|
1723 |
|
1724 |
|
1725 |
|
1726 |
|
1727 |
|
1728 |
|
1729 |
|
1730 |
|
1731 |
|
1732 |
|
1733 |
|
1734 |
|
1735 |
|
1736 |
|
1737 |
|
1738 |
|
1739 |
|
1740 |
|
1741 |
|
1742 |
|
1743 |
|
1744 |
|
1745 |
|
1746 |
|
1747 | <dt class="tag-source">Source:</dt>
|
1748 | <dd class="tag-source"><ul class="dummy"><li>
|
1749 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line558">line 558</a>
|
1750 | </li></ul></dd>
|
1751 |
|
1752 |
|
1753 |
|
1754 |
|
1755 |
|
1756 |
|
1757 |
|
1758 | </dl>
|
1759 |
|
1760 |
|
1761 |
|
1762 |
|
1763 |
|
1764 |
|
1765 |
|
1766 |
|
1767 |
|
1768 | <h5>Parameters:</h5>
|
1769 |
|
1770 |
|
1771 | <table class="params">
|
1772 | <thead>
|
1773 | <tr>
|
1774 |
|
1775 | <th>Name</th>
|
1776 |
|
1777 |
|
1778 | <th>Type</th>
|
1779 |
|
1780 |
|
1781 |
|
1782 |
|
1783 |
|
1784 | <th class="last">Description</th>
|
1785 | </tr>
|
1786 | </thead>
|
1787 |
|
1788 | <tbody>
|
1789 |
|
1790 |
|
1791 | <tr>
|
1792 |
|
1793 | <td class="name"><code>schema</code></td>
|
1794 |
|
1795 |
|
1796 | <td class="type">
|
1797 |
|
1798 |
|
1799 | <span class="param-type"><code>string</code></span>
|
1800 |
|
1801 |
|
1802 |
|
1803 | </td>
|
1804 |
|
1805 |
|
1806 |
|
1807 |
|
1808 |
|
1809 | <td class="description last">
|
1810 | <p>a valid GraphQL IDL schema string.</p>
|
1811 |
|
1812 | </td>
|
1813 | </tr>
|
1814 |
|
1815 |
|
1816 | </tbody>
|
1817 | </table>
|
1818 |
|
1819 |
|
1820 |
|
1821 |
|
1822 |
|
1823 |
|
1824 |
|
1825 |
|
1826 |
|
1827 |
|
1828 |
|
1829 |
|
1830 |
|
1831 |
|
1832 | <div class="section-returns">
|
1833 | <h5>Returns:</h5>
|
1834 |
|
1835 |
|
1836 |
|
1837 | <dl class="param-type">
|
1838 | <dt>
|
1839 | Type:
|
1840 | </dt>
|
1841 | <dd>
|
1842 |
|
1843 | <span class="param-type"><code><a href="SyntaxTree.html">SyntaxTree</a></code></span>
|
1844 |
|
1845 |
|
1846 | </dd>
|
1847 | </dl>
|
1848 |
|
1849 |
|
1850 | <div class="param-desc">
|
1851 | <p>a new instance of SyntaxTree initialized with a<br>parsed response from require('graphql').parse().</p>
|
1852 | </div>
|
1853 |
|
1854 |
|
1855 | </div>
|
1856 |
|
1857 |
|
1858 |
|
1859 | </div>
|
1860 |
|
1861 |
|
1862 | <div class="section-method">
|
1863 |
|
1864 |
|
1865 |
|
1866 | <h4 class="name" id=".%E2%8E%86%E2%A0%80constructor"><span class="type-signature">(static) </span>⎆⠀constructor<span class="signature">(schemaOrASTOrST)</span><span class="type-signature"></span></h4>
|
1867 |
|
1868 |
|
1869 |
|
1870 |
|
1871 |
|
1872 | <div class="description">
|
1873 | <p>Constructs a new <code>SyntaxTree</code> object. If a string schema is supplied or<br>an already parsed AST object, either of which is valid GraphQL IDL, then<br>its parsed AST will be the internals of this object.</p>
|
1874 | </div>
|
1875 |
|
1876 |
|
1877 |
|
1878 |
|
1879 |
|
1880 | <dl class="details">
|
1881 |
|
1882 |
|
1883 |
|
1884 |
|
1885 |
|
1886 |
|
1887 |
|
1888 |
|
1889 |
|
1890 |
|
1891 |
|
1892 |
|
1893 |
|
1894 |
|
1895 |
|
1896 |
|
1897 |
|
1898 |
|
1899 |
|
1900 |
|
1901 |
|
1902 |
|
1903 |
|
1904 |
|
1905 |
|
1906 |
|
1907 | <dt class="tag-source">Source:</dt>
|
1908 | <dd class="tag-source"><ul class="dummy"><li>
|
1909 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line33">line 33</a>
|
1910 | </li></ul></dd>
|
1911 |
|
1912 |
|
1913 |
|
1914 |
|
1915 |
|
1916 |
|
1917 |
|
1918 | </dl>
|
1919 |
|
1920 |
|
1921 |
|
1922 |
|
1923 |
|
1924 |
|
1925 |
|
1926 |
|
1927 |
|
1928 | <h5>Parameters:</h5>
|
1929 |
|
1930 |
|
1931 | <table class="params">
|
1932 | <thead>
|
1933 | <tr>
|
1934 |
|
1935 | <th>Name</th>
|
1936 |
|
1937 |
|
1938 | <th>Type</th>
|
1939 |
|
1940 |
|
1941 |
|
1942 |
|
1943 |
|
1944 | <th class="last">Description</th>
|
1945 | </tr>
|
1946 | </thead>
|
1947 |
|
1948 | <tbody>
|
1949 |
|
1950 |
|
1951 | <tr>
|
1952 |
|
1953 | <td class="name"><code>schemaOrASTOrST</code></td>
|
1954 |
|
1955 |
|
1956 | <td class="type">
|
1957 |
|
1958 |
|
1959 | <span class="param-type"><code>string</code></span>
|
1960 | |
|
1961 |
|
1962 | <span class="param-type"><code>Object</code></span>
|
1963 | |
|
1964 |
|
1965 | <span class="param-type"><code><a href="SyntaxTree.html">SyntaxTree</a></code></span>
|
1966 |
|
1967 |
|
1968 |
|
1969 | </td>
|
1970 |
|
1971 |
|
1972 |
|
1973 |
|
1974 |
|
1975 | <td class="description last">
|
1976 | <p>if supplied the tree<br>will be constructed with the contents of the data. If a string of IDL is<br>given, it will be parsed. If an AST is given, it will be verified. If a<br>SyntaxTree is supplied, it will be copied.</p>
|
1977 |
|
1978 | </td>
|
1979 | </tr>
|
1980 |
|
1981 |
|
1982 | </tbody>
|
1983 | </table>
|
1984 |
|
1985 |
|
1986 |
|
1987 |
|
1988 |
|
1989 |
|
1990 |
|
1991 |
|
1992 |
|
1993 |
|
1994 |
|
1995 |
|
1996 |
|
1997 |
|
1998 |
|
1999 |
|
2000 | </div>
|
2001 |
|
2002 |
|
2003 | <div class="section-method">
|
2004 |
|
2005 |
|
2006 |
|
2007 | <h4 class="name" id="%E2%8C%BE%E2%A0%80appendDefinitions"><span class="type-signature"></span>⌾⠀appendDefinitions<span class="signature">(schemaOrASTOrST)</span><span class="type-signature"> → {<a href="SyntaxTree.html">SyntaxTree</a>}</span></h4>
|
2008 |
|
2009 |
|
2010 |
|
2011 |
|
2012 |
|
2013 | <div class="description">
|
2014 | <p>Appends all definitions from another AST to this one. The method will<br>actually create a copy using SyntaxTree.from() so the input types can<br>be any one of a valid GraphQL IDL schema string, a GraphQL IDL AST or<br>another SyntaxTree object instance.</p>
|
2015 | <p>Definitions of the same name but different kinds will be replaced by the<br>new copy. Those of the same kind and name will be merged (TODO handle more<br>than ObjectTypeDefinition kinds when merging; currently other types are<br>overwritten).</p>
|
2016 | </div>
|
2017 |
|
2018 |
|
2019 |
|
2020 |
|
2021 |
|
2022 | <dl class="details">
|
2023 |
|
2024 |
|
2025 |
|
2026 |
|
2027 |
|
2028 |
|
2029 |
|
2030 |
|
2031 |
|
2032 |
|
2033 |
|
2034 |
|
2035 |
|
2036 |
|
2037 |
|
2038 |
|
2039 |
|
2040 |
|
2041 |
|
2042 |
|
2043 |
|
2044 |
|
2045 |
|
2046 |
|
2047 |
|
2048 |
|
2049 | <dt class="tag-source">Source:</dt>
|
2050 | <dd class="tag-source"><ul class="dummy"><li>
|
2051 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line170">line 170</a>
|
2052 | </li></ul></dd>
|
2053 |
|
2054 |
|
2055 |
|
2056 |
|
2057 |
|
2058 |
|
2059 |
|
2060 | </dl>
|
2061 |
|
2062 |
|
2063 |
|
2064 |
|
2065 |
|
2066 |
|
2067 |
|
2068 |
|
2069 |
|
2070 | <h5>Parameters:</h5>
|
2071 |
|
2072 |
|
2073 | <table class="params">
|
2074 | <thead>
|
2075 | <tr>
|
2076 |
|
2077 | <th>Name</th>
|
2078 |
|
2079 |
|
2080 | <th>Type</th>
|
2081 |
|
2082 |
|
2083 |
|
2084 |
|
2085 |
|
2086 | <th class="last">Description</th>
|
2087 | </tr>
|
2088 | </thead>
|
2089 |
|
2090 | <tbody>
|
2091 |
|
2092 |
|
2093 | <tr>
|
2094 |
|
2095 | <td class="name"><code>schemaOrASTOrST</code></td>
|
2096 |
|
2097 |
|
2098 | <td class="type">
|
2099 |
|
2100 |
|
2101 | <span class="param-type"><code>string</code></span>
|
2102 | |
|
2103 |
|
2104 | <span class="param-type"><code>Object</code></span>
|
2105 | |
|
2106 |
|
2107 | <span class="param-type"><code><a href="SyntaxTree.html">SyntaxTree</a></code></span>
|
2108 |
|
2109 |
|
2110 |
|
2111 | </td>
|
2112 |
|
2113 |
|
2114 |
|
2115 |
|
2116 |
|
2117 | <td class="description last">
|
2118 | <p>an instance of one of<br>the valid types for SyntaxTree.from() that can be used to create or<br>duplicate the source from which to copy definitions.</p>
|
2119 |
|
2120 | </td>
|
2121 | </tr>
|
2122 |
|
2123 |
|
2124 | </tbody>
|
2125 | </table>
|
2126 |
|
2127 |
|
2128 |
|
2129 |
|
2130 |
|
2131 |
|
2132 |
|
2133 |
|
2134 |
|
2135 |
|
2136 |
|
2137 |
|
2138 |
|
2139 |
|
2140 | <div class="section-returns">
|
2141 | <h5>Returns:</h5>
|
2142 |
|
2143 |
|
2144 |
|
2145 | <dl class="param-type">
|
2146 | <dt>
|
2147 | Type:
|
2148 | </dt>
|
2149 | <dd>
|
2150 |
|
2151 | <span class="param-type"><code><a href="SyntaxTree.html">SyntaxTree</a></code></span>
|
2152 |
|
2153 |
|
2154 | </dd>
|
2155 | </dl>
|
2156 |
|
2157 |
|
2158 | <div class="param-desc">
|
2159 | <p>this for inlining</p>
|
2160 | </div>
|
2161 |
|
2162 |
|
2163 | </div>
|
2164 |
|
2165 |
|
2166 |
|
2167 | </div>
|
2168 |
|
2169 |
|
2170 | <div class="section-method">
|
2171 |
|
2172 |
|
2173 |
|
2174 | <h4 class="name" id="%E2%8C%BE%E2%A0%80consumeDefinition"><span class="type-signature"></span>⌾⠀consumeDefinition<span class="signature">(astOrSyntaxTree, definitionType)</span><span class="type-signature"> → {<a href="SyntaxTree.html">SyntaxTree</a>}</span></h4>
|
2175 |
|
2176 |
|
2177 |
|
2178 |
|
2179 |
|
2180 | <div class="description">
|
2181 | <p>This method finds the Query type definitions in the supplied AST or<br>SyntaxTree objects, takes its defined fields and adds it to the current<br>instances. If this instance does not have a Query type defined but the<br>supplied object does, then the supplied one is moved over. If neither<br>has a query handler, then nothing happens.</p>
|
2182 | <p>NOTE this <em>removes</em> the Query type definition from the supplied AST or<br>SyntaxTree object.</p>
|
2183 | </div>
|
2184 |
|
2185 |
|
2186 |
|
2187 |
|
2188 |
|
2189 | <dl class="details">
|
2190 |
|
2191 |
|
2192 |
|
2193 |
|
2194 |
|
2195 |
|
2196 |
|
2197 |
|
2198 |
|
2199 |
|
2200 |
|
2201 |
|
2202 |
|
2203 |
|
2204 |
|
2205 |
|
2206 |
|
2207 |
|
2208 |
|
2209 |
|
2210 |
|
2211 |
|
2212 |
|
2213 |
|
2214 |
|
2215 |
|
2216 | <dt class="tag-source">Source:</dt>
|
2217 | <dd class="tag-source"><ul class="dummy"><li>
|
2218 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line240">line 240</a>
|
2219 | </li></ul></dd>
|
2220 |
|
2221 |
|
2222 |
|
2223 |
|
2224 |
|
2225 |
|
2226 |
|
2227 | </dl>
|
2228 |
|
2229 |
|
2230 |
|
2231 |
|
2232 |
|
2233 |
|
2234 |
|
2235 |
|
2236 |
|
2237 | <h5>Parameters:</h5>
|
2238 |
|
2239 |
|
2240 | <table class="params">
|
2241 | <thead>
|
2242 | <tr>
|
2243 |
|
2244 | <th>Name</th>
|
2245 |
|
2246 |
|
2247 | <th>Type</th>
|
2248 |
|
2249 |
|
2250 |
|
2251 |
|
2252 |
|
2253 | <th class="last">Description</th>
|
2254 | </tr>
|
2255 | </thead>
|
2256 |
|
2257 | <tbody>
|
2258 |
|
2259 |
|
2260 | <tr>
|
2261 |
|
2262 | <td class="name"><code>astOrSyntaxTree</code></td>
|
2263 |
|
2264 |
|
2265 | <td class="type">
|
2266 |
|
2267 |
|
2268 | <span class="param-type"><code>Object</code></span>
|
2269 | |
|
2270 |
|
2271 | <span class="param-type"><code><a href="SyntaxTree.html">SyntaxTree</a></code></span>
|
2272 |
|
2273 |
|
2274 |
|
2275 | </td>
|
2276 |
|
2277 |
|
2278 |
|
2279 |
|
2280 |
|
2281 | <td class="description last">
|
2282 | <p>a valid GraphQL IDL AST or<br>an instance of SyntaxTree that represents one.</p>
|
2283 |
|
2284 | </td>
|
2285 | </tr>
|
2286 |
|
2287 |
|
2288 |
|
2289 | <tr>
|
2290 |
|
2291 | <td class="name"><code>definitionType</code></td>
|
2292 |
|
2293 |
|
2294 | <td class="type">
|
2295 |
|
2296 |
|
2297 | <span class="param-type"><code>string</code></span>
|
2298 | |
|
2299 |
|
2300 | <span class="param-type"><code>RegExp</code></span>
|
2301 |
|
2302 |
|
2303 |
|
2304 | </td>
|
2305 |
|
2306 |
|
2307 |
|
2308 |
|
2309 |
|
2310 | <td class="description last">
|
2311 | <p>a valid search input as would be<br>accepted for the #find() method of this object.</p>
|
2312 |
|
2313 | </td>
|
2314 | </tr>
|
2315 |
|
2316 |
|
2317 | </tbody>
|
2318 | </table>
|
2319 |
|
2320 |
|
2321 |
|
2322 |
|
2323 |
|
2324 |
|
2325 |
|
2326 |
|
2327 |
|
2328 |
|
2329 |
|
2330 |
|
2331 |
|
2332 |
|
2333 | <div class="section-returns">
|
2334 | <h5>Returns:</h5>
|
2335 |
|
2336 |
|
2337 |
|
2338 | <dl class="param-type">
|
2339 | <dt>
|
2340 | Type:
|
2341 | </dt>
|
2342 | <dd>
|
2343 |
|
2344 | <span class="param-type"><code><a href="SyntaxTree.html">SyntaxTree</a></code></span>
|
2345 |
|
2346 |
|
2347 | </dd>
|
2348 | </dl>
|
2349 |
|
2350 |
|
2351 | <div class="param-desc">
|
2352 | <p>returns this for inlining</p>
|
2353 | </div>
|
2354 |
|
2355 |
|
2356 | </div>
|
2357 |
|
2358 |
|
2359 |
|
2360 | </div>
|
2361 |
|
2362 |
|
2363 | <div class="section-method">
|
2364 |
|
2365 |
|
2366 |
|
2367 | <h4 class="name" id="%E2%8C%BE%E2%A0%80find"><span class="type-signature"></span>⌾⠀find<span class="signature">(definitionName)</span><span class="type-signature"> → {Object|null}</span></h4>
|
2368 |
|
2369 |
|
2370 |
|
2371 |
|
2372 |
|
2373 | <div class="description">
|
2374 | <p>Iterate through the definitions of the AST if there are any. For each<br>definition the name property's value field is compared to the supplied<br>definitionName. The definitionName can be a string or a regular<br>expression if finer granularity is desired.</p>
|
2375 | </div>
|
2376 |
|
2377 |
|
2378 |
|
2379 |
|
2380 |
|
2381 | <dl class="details">
|
2382 |
|
2383 |
|
2384 |
|
2385 |
|
2386 |
|
2387 |
|
2388 |
|
2389 |
|
2390 |
|
2391 |
|
2392 |
|
2393 |
|
2394 |
|
2395 |
|
2396 |
|
2397 |
|
2398 |
|
2399 |
|
2400 |
|
2401 |
|
2402 |
|
2403 |
|
2404 |
|
2405 |
|
2406 |
|
2407 |
|
2408 | <dt class="tag-source">Source:</dt>
|
2409 | <dd class="tag-source"><ul class="dummy"><li>
|
2410 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line420">line 420</a>
|
2411 | </li></ul></dd>
|
2412 |
|
2413 |
|
2414 |
|
2415 |
|
2416 |
|
2417 |
|
2418 |
|
2419 | </dl>
|
2420 |
|
2421 |
|
2422 |
|
2423 |
|
2424 |
|
2425 |
|
2426 |
|
2427 |
|
2428 |
|
2429 | <h5>Parameters:</h5>
|
2430 |
|
2431 |
|
2432 | <table class="params">
|
2433 | <thead>
|
2434 | <tr>
|
2435 |
|
2436 | <th>Name</th>
|
2437 |
|
2438 |
|
2439 | <th>Type</th>
|
2440 |
|
2441 |
|
2442 |
|
2443 |
|
2444 |
|
2445 | <th class="last">Description</th>
|
2446 | </tr>
|
2447 | </thead>
|
2448 |
|
2449 | <tbody>
|
2450 |
|
2451 |
|
2452 | <tr>
|
2453 |
|
2454 | <td class="name"><code>definitionName</code></td>
|
2455 |
|
2456 |
|
2457 | <td class="type">
|
2458 |
|
2459 |
|
2460 | <span class="param-type"><code>string</code></span>
|
2461 | |
|
2462 |
|
2463 | <span class="param-type"><code>RegExp</code></span>
|
2464 |
|
2465 |
|
2466 |
|
2467 | </td>
|
2468 |
|
2469 |
|
2470 |
|
2471 |
|
2472 |
|
2473 | <td class="description last">
|
2474 | <p>a string or regular expression used<br>to match against the definition name field in a given AST.</p>
|
2475 |
|
2476 | </td>
|
2477 | </tr>
|
2478 |
|
2479 |
|
2480 | </tbody>
|
2481 | </table>
|
2482 |
|
2483 |
|
2484 |
|
2485 |
|
2486 |
|
2487 |
|
2488 |
|
2489 |
|
2490 |
|
2491 |
|
2492 |
|
2493 |
|
2494 |
|
2495 |
|
2496 | <div class="section-returns">
|
2497 | <h5>Returns:</h5>
|
2498 |
|
2499 |
|
2500 |
|
2501 | <dl class="param-type">
|
2502 | <dt>
|
2503 | Type:
|
2504 | </dt>
|
2505 | <dd>
|
2506 |
|
2507 | <span class="param-type"><code>Object</code></span>
|
2508 | |
|
2509 |
|
2510 | <span class="param-type"><code>null</code></span>
|
2511 |
|
2512 |
|
2513 | </dd>
|
2514 | </dl>
|
2515 |
|
2516 |
|
2517 | <div class="param-desc">
|
2518 | <p>a reference to the internal definition field or<br>null if one with a matching name could not be found.</p>
|
2519 | </div>
|
2520 |
|
2521 |
|
2522 | </div>
|
2523 |
|
2524 |
|
2525 |
|
2526 | </div>
|
2527 |
|
2528 |
|
2529 | <div class="section-method">
|
2530 |
|
2531 |
|
2532 |
|
2533 | <h4 class="name" id="%E2%8C%BE%E2%A0%80findEnumDefinition"><span class="type-signature"></span>⌾⠀findEnumDefinition<span class="signature">(ast, enumDefinitionName, enumValueName)</span><span class="type-signature"> → {Object|null}</span></h4>
|
2534 |
|
2535 |
|
2536 |
|
2537 |
|
2538 |
|
2539 | <div class="description">
|
2540 | <p>Enum AST definitions operate differently than object type definitions<br>do. Namely, they do not have a <code>fields</code> array but instead have a <code>values</code><br>array. This wrapper method, first finds the enum definition in the ast<br>and then searches the values for the named node desired and returns that<br>or null, if one could not be found.</p>
|
2541 | </div>
|
2542 |
|
2543 |
|
2544 |
|
2545 |
|
2546 |
|
2547 | <dl class="details">
|
2548 |
|
2549 |
|
2550 |
|
2551 |
|
2552 | <dt class="tag-since">Since:</dt>
|
2553 | <dd class="tag-since"><ul class="dummy"><li>2.7.0</li></ul></dd>
|
2554 |
|
2555 |
|
2556 |
|
2557 |
|
2558 |
|
2559 |
|
2560 |
|
2561 |
|
2562 |
|
2563 |
|
2564 |
|
2565 |
|
2566 |
|
2567 |
|
2568 |
|
2569 |
|
2570 |
|
2571 |
|
2572 |
|
2573 |
|
2574 |
|
2575 |
|
2576 |
|
2577 | <dt class="tag-source">Source:</dt>
|
2578 | <dd class="tag-source"><ul class="dummy"><li>
|
2579 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line676">line 676</a>
|
2580 | </li></ul></dd>
|
2581 |
|
2582 |
|
2583 |
|
2584 |
|
2585 |
|
2586 |
|
2587 |
|
2588 | </dl>
|
2589 |
|
2590 |
|
2591 |
|
2592 |
|
2593 |
|
2594 |
|
2595 |
|
2596 |
|
2597 |
|
2598 | <h5>Parameters:</h5>
|
2599 |
|
2600 |
|
2601 | <table class="params">
|
2602 | <thead>
|
2603 | <tr>
|
2604 |
|
2605 | <th>Name</th>
|
2606 |
|
2607 |
|
2608 | <th>Type</th>
|
2609 |
|
2610 |
|
2611 |
|
2612 |
|
2613 |
|
2614 | <th class="last">Description</th>
|
2615 | </tr>
|
2616 | </thead>
|
2617 |
|
2618 | <tbody>
|
2619 |
|
2620 |
|
2621 | <tr>
|
2622 |
|
2623 | <td class="name"><code>ast</code></td>
|
2624 |
|
2625 |
|
2626 | <td class="type">
|
2627 |
|
2628 |
|
2629 | <span class="param-type"><code>Object</code></span>
|
2630 |
|
2631 |
|
2632 |
|
2633 | </td>
|
2634 |
|
2635 |
|
2636 |
|
2637 |
|
2638 |
|
2639 | <td class="description last">
|
2640 | <p>the abstract syntax tree parsed by graphql</p>
|
2641 |
|
2642 | </td>
|
2643 | </tr>
|
2644 |
|
2645 |
|
2646 |
|
2647 | <tr>
|
2648 |
|
2649 | <td class="name"><code>enumDefinitionName</code></td>
|
2650 |
|
2651 |
|
2652 | <td class="type">
|
2653 |
|
2654 |
|
2655 | <span class="param-type"><code>string</code></span>
|
2656 | |
|
2657 |
|
2658 | <span class="param-type"><code>RegExp</code></span>
|
2659 |
|
2660 |
|
2661 |
|
2662 | </td>
|
2663 |
|
2664 |
|
2665 |
|
2666 |
|
2667 |
|
2668 | <td class="description last">
|
2669 | <p>a string or regular expression<br>used to locate the enum definition in the AST.</p>
|
2670 |
|
2671 | </td>
|
2672 | </tr>
|
2673 |
|
2674 |
|
2675 |
|
2676 | <tr>
|
2677 |
|
2678 | <td class="name"><code>enumValueName</code></td>
|
2679 |
|
2680 |
|
2681 | <td class="type">
|
2682 |
|
2683 |
|
2684 | <span class="param-type"><code>string</code></span>
|
2685 | |
|
2686 |
|
2687 | <span class="param-type"><code>RegExp</code></span>
|
2688 |
|
2689 |
|
2690 |
|
2691 | </td>
|
2692 |
|
2693 |
|
2694 |
|
2695 |
|
2696 |
|
2697 | <td class="description last">
|
2698 | <p>a string or regular expression used<br>to locate the value by name in the values of the enum definition.</p>
|
2699 |
|
2700 | </td>
|
2701 | </tr>
|
2702 |
|
2703 |
|
2704 | </tbody>
|
2705 | </table>
|
2706 |
|
2707 |
|
2708 |
|
2709 |
|
2710 |
|
2711 |
|
2712 |
|
2713 |
|
2714 |
|
2715 |
|
2716 |
|
2717 |
|
2718 |
|
2719 |
|
2720 | <div class="section-returns">
|
2721 | <h5>Returns:</h5>
|
2722 |
|
2723 |
|
2724 |
|
2725 | <dl class="param-type">
|
2726 | <dt>
|
2727 | Type:
|
2728 | </dt>
|
2729 | <dd>
|
2730 |
|
2731 | <span class="param-type"><code>Object</code></span>
|
2732 | |
|
2733 |
|
2734 | <span class="param-type"><code>null</code></span>
|
2735 |
|
2736 |
|
2737 | </dd>
|
2738 | </dl>
|
2739 |
|
2740 |
|
2741 | <div class="param-desc">
|
2742 | <p>the desired AST node or null if one does not exist</p>
|
2743 | </div>
|
2744 |
|
2745 |
|
2746 | </div>
|
2747 |
|
2748 |
|
2749 |
|
2750 | </div>
|
2751 |
|
2752 |
|
2753 | <div class="section-method">
|
2754 |
|
2755 |
|
2756 |
|
2757 | <h4 class="name" id="%E2%8C%BE%E2%A0%80setAST"><span class="type-signature"></span>⌾⠀setAST<span class="signature">(schemaOrAST)</span><span class="type-signature"> → {<a href="SyntaxTree.html">SyntaxTree</a>}</span></h4>
|
2758 |
|
2759 |
|
2760 |
|
2761 |
|
2762 |
|
2763 | <div class="description">
|
2764 | <p>Sets the underlying AST object with either schema which will be parsed<br>into a valid AST or an existing AST. Previous ast values will be erased.</p>
|
2765 | </div>
|
2766 |
|
2767 |
|
2768 |
|
2769 |
|
2770 |
|
2771 | <dl class="details">
|
2772 |
|
2773 |
|
2774 |
|
2775 |
|
2776 |
|
2777 |
|
2778 |
|
2779 |
|
2780 |
|
2781 |
|
2782 |
|
2783 |
|
2784 |
|
2785 |
|
2786 |
|
2787 |
|
2788 |
|
2789 |
|
2790 |
|
2791 |
|
2792 |
|
2793 |
|
2794 |
|
2795 |
|
2796 |
|
2797 |
|
2798 | <dt class="tag-source">Source:</dt>
|
2799 | <dd class="tag-source"><ul class="dummy"><li>
|
2800 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line87">line 87</a>
|
2801 | </li></ul></dd>
|
2802 |
|
2803 |
|
2804 |
|
2805 |
|
2806 |
|
2807 |
|
2808 |
|
2809 | </dl>
|
2810 |
|
2811 |
|
2812 |
|
2813 |
|
2814 |
|
2815 |
|
2816 |
|
2817 |
|
2818 |
|
2819 | <h5>Parameters:</h5>
|
2820 |
|
2821 |
|
2822 | <table class="params">
|
2823 | <thead>
|
2824 | <tr>
|
2825 |
|
2826 | <th>Name</th>
|
2827 |
|
2828 |
|
2829 | <th>Type</th>
|
2830 |
|
2831 |
|
2832 |
|
2833 |
|
2834 |
|
2835 | <th class="last">Description</th>
|
2836 | </tr>
|
2837 | </thead>
|
2838 |
|
2839 | <tbody>
|
2840 |
|
2841 |
|
2842 | <tr>
|
2843 |
|
2844 | <td class="name"><code>schemaOrAST</code></td>
|
2845 |
|
2846 |
|
2847 | <td class="type">
|
2848 |
|
2849 |
|
2850 | <span class="param-type"><code>string</code></span>
|
2851 | |
|
2852 |
|
2853 | <span class="param-type"><code>Object</code></span>
|
2854 |
|
2855 |
|
2856 |
|
2857 | </td>
|
2858 |
|
2859 |
|
2860 |
|
2861 |
|
2862 |
|
2863 | <td class="description last">
|
2864 | <p>a valid GraphQL IDL schema or a<br>previosuly parsed or compatible GraphQL IDL AST object.</p>
|
2865 |
|
2866 | </td>
|
2867 | </tr>
|
2868 |
|
2869 |
|
2870 | </tbody>
|
2871 | </table>
|
2872 |
|
2873 |
|
2874 |
|
2875 |
|
2876 |
|
2877 |
|
2878 |
|
2879 |
|
2880 |
|
2881 |
|
2882 |
|
2883 |
|
2884 |
|
2885 |
|
2886 | <div class="section-returns">
|
2887 | <h5>Returns:</h5>
|
2888 |
|
2889 |
|
2890 |
|
2891 | <dl class="param-type">
|
2892 | <dt>
|
2893 | Type:
|
2894 | </dt>
|
2895 | <dd>
|
2896 |
|
2897 | <span class="param-type"><code><a href="SyntaxTree.html">SyntaxTree</a></code></span>
|
2898 |
|
2899 |
|
2900 | </dd>
|
2901 | </dl>
|
2902 |
|
2903 |
|
2904 | <div class="param-desc">
|
2905 | <p>this for inlining.</p>
|
2906 | </div>
|
2907 |
|
2908 |
|
2909 | </div>
|
2910 |
|
2911 |
|
2912 |
|
2913 | </div>
|
2914 |
|
2915 |
|
2916 | <div class="section-method">
|
2917 |
|
2918 |
|
2919 |
|
2920 | <h4 class="name" id="%E2%8C%BE%E2%A0%80toString"><span class="type-signature"></span>⌾⠀toString<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
|
2921 |
|
2922 |
|
2923 |
|
2924 |
|
2925 |
|
2926 | <div class="description">
|
2927 | <p>SyntaxTree instances that are toString()'ed will have the graphql method<br>print() called on them to convert their internal structures back to a<br>GraphQL IDL schema syntax. If the object is in an invalid state, it WILL<br>throw an error.</p>
|
2928 | </div>
|
2929 |
|
2930 |
|
2931 |
|
2932 |
|
2933 |
|
2934 | <dl class="details">
|
2935 |
|
2936 |
|
2937 |
|
2938 |
|
2939 |
|
2940 |
|
2941 |
|
2942 |
|
2943 |
|
2944 |
|
2945 |
|
2946 |
|
2947 |
|
2948 |
|
2949 |
|
2950 |
|
2951 |
|
2952 |
|
2953 |
|
2954 |
|
2955 |
|
2956 |
|
2957 |
|
2958 |
|
2959 |
|
2960 |
|
2961 | <dt class="tag-source">Source:</dt>
|
2962 | <dd class="tag-source"><ul class="dummy"><li>
|
2963 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line440">line 440</a>
|
2964 | </li></ul></dd>
|
2965 |
|
2966 |
|
2967 |
|
2968 |
|
2969 |
|
2970 |
|
2971 |
|
2972 | </dl>
|
2973 |
|
2974 |
|
2975 |
|
2976 |
|
2977 |
|
2978 |
|
2979 |
|
2980 |
|
2981 |
|
2982 |
|
2983 |
|
2984 |
|
2985 |
|
2986 |
|
2987 |
|
2988 |
|
2989 |
|
2990 |
|
2991 |
|
2992 |
|
2993 |
|
2994 | <div class="section-returns">
|
2995 | <h5>Returns:</h5>
|
2996 |
|
2997 |
|
2998 |
|
2999 | <dl class="param-type">
|
3000 | <dt>
|
3001 | Type:
|
3002 | </dt>
|
3003 | <dd>
|
3004 |
|
3005 | <span class="param-type"><code>string</code></span>
|
3006 |
|
3007 |
|
3008 | </dd>
|
3009 | </dl>
|
3010 |
|
3011 |
|
3012 | <div class="param-desc">
|
3013 | <p>the AST for the tree parsed back into a string</p>
|
3014 | </div>
|
3015 |
|
3016 |
|
3017 | </div>
|
3018 |
|
3019 |
|
3020 |
|
3021 | </div>
|
3022 |
|
3023 |
|
3024 | <div class="section-method">
|
3025 |
|
3026 |
|
3027 |
|
3028 | <h4 class="name" id="%E2%8C%BE%E2%A0%80updateAST"><span class="type-signature"></span>⌾⠀updateAST<span class="signature">(ast)</span><span class="type-signature"> → {<a href="SyntaxTree.html">SyntaxTree</a>}</span></h4>
|
3029 |
|
3030 |
|
3031 |
|
3032 |
|
3033 |
|
3034 | <div class="description">
|
3035 | <p>As passthru update method that works on the internal AST object. If<br>an error occurs, the update is skipped. An error can occur if adding the<br>changes would make the AST invalid. In such a case, the error is logged<br>to the error console.</p>
|
3036 | </div>
|
3037 |
|
3038 |
|
3039 |
|
3040 |
|
3041 |
|
3042 | <dl class="details">
|
3043 |
|
3044 |
|
3045 |
|
3046 |
|
3047 |
|
3048 |
|
3049 |
|
3050 |
|
3051 |
|
3052 |
|
3053 |
|
3054 |
|
3055 |
|
3056 |
|
3057 |
|
3058 |
|
3059 |
|
3060 |
|
3061 |
|
3062 |
|
3063 |
|
3064 |
|
3065 |
|
3066 |
|
3067 |
|
3068 |
|
3069 | <dt class="tag-source">Source:</dt>
|
3070 | <dd class="tag-source"><ul class="dummy"><li>
|
3071 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line138">line 138</a>
|
3072 | </li></ul></dd>
|
3073 |
|
3074 |
|
3075 |
|
3076 |
|
3077 |
|
3078 |
|
3079 |
|
3080 | </dl>
|
3081 |
|
3082 |
|
3083 |
|
3084 |
|
3085 |
|
3086 |
|
3087 |
|
3088 |
|
3089 |
|
3090 | <h5>Parameters:</h5>
|
3091 |
|
3092 |
|
3093 | <table class="params">
|
3094 | <thead>
|
3095 | <tr>
|
3096 |
|
3097 | <th>Name</th>
|
3098 |
|
3099 |
|
3100 | <th>Type</th>
|
3101 |
|
3102 |
|
3103 |
|
3104 |
|
3105 |
|
3106 | <th class="last">Description</th>
|
3107 | </tr>
|
3108 | </thead>
|
3109 |
|
3110 | <tbody>
|
3111 |
|
3112 |
|
3113 | <tr>
|
3114 |
|
3115 | <td class="name"><code>ast</code></td>
|
3116 |
|
3117 |
|
3118 | <td class="type">
|
3119 |
|
3120 |
|
3121 | <span class="param-type"><code>Object</code></span>
|
3122 |
|
3123 |
|
3124 |
|
3125 | </td>
|
3126 |
|
3127 |
|
3128 |
|
3129 |
|
3130 |
|
3131 | <td class="description last">
|
3132 | <p>an existing GraphQL IDL AST object that will be<br>merged on top of the existing tree using _.merge()</p>
|
3133 |
|
3134 | </td>
|
3135 | </tr>
|
3136 |
|
3137 |
|
3138 | </tbody>
|
3139 | </table>
|
3140 |
|
3141 |
|
3142 |
|
3143 |
|
3144 |
|
3145 |
|
3146 |
|
3147 |
|
3148 |
|
3149 |
|
3150 |
|
3151 |
|
3152 |
|
3153 |
|
3154 | <div class="section-returns">
|
3155 | <h5>Returns:</h5>
|
3156 |
|
3157 |
|
3158 |
|
3159 | <dl class="param-type">
|
3160 | <dt>
|
3161 | Type:
|
3162 | </dt>
|
3163 | <dd>
|
3164 |
|
3165 | <span class="param-type"><code><a href="SyntaxTree.html">SyntaxTree</a></code></span>
|
3166 |
|
3167 |
|
3168 | </dd>
|
3169 | </dl>
|
3170 |
|
3171 |
|
3172 | <div class="param-desc">
|
3173 | <p>this for inlining.</p>
|
3174 | </div>
|
3175 |
|
3176 |
|
3177 | </div>
|
3178 |
|
3179 |
|
3180 |
|
3181 | </div>
|
3182 |
|
3183 |
|
3184 | <div class="section-method">
|
3185 |
|
3186 |
|
3187 |
|
3188 | <h4 class="name" id="%E2%AC%86%EF%B8%8E%E2%A0%80ast"><span class="type-signature"></span>⬆︎⠀ast<span class="signature">(value)</span><span class="type-signature"></span></h4>
|
3189 |
|
3190 |
|
3191 |
|
3192 |
|
3193 |
|
3194 | <div class="description">
|
3195 | <p>Setter that assigns the abstract syntax tree, typically created by<br><code>graphql.parse</code> when given a valid string of IDL.</p>
|
3196 | </div>
|
3197 |
|
3198 |
|
3199 |
|
3200 |
|
3201 |
|
3202 | <dl class="details">
|
3203 |
|
3204 |
|
3205 |
|
3206 |
|
3207 |
|
3208 |
|
3209 |
|
3210 |
|
3211 |
|
3212 |
|
3213 |
|
3214 |
|
3215 |
|
3216 |
|
3217 |
|
3218 |
|
3219 |
|
3220 |
|
3221 |
|
3222 |
|
3223 |
|
3224 |
|
3225 |
|
3226 |
|
3227 |
|
3228 |
|
3229 | <dt class="tag-source">Source:</dt>
|
3230 | <dd class="tag-source"><ul class="dummy"><li>
|
3231 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line71">line 71</a>
|
3232 | </li></ul></dd>
|
3233 |
|
3234 |
|
3235 |
|
3236 |
|
3237 |
|
3238 |
|
3239 |
|
3240 | </dl>
|
3241 |
|
3242 |
|
3243 |
|
3244 |
|
3245 |
|
3246 |
|
3247 |
|
3248 |
|
3249 |
|
3250 | <h5>Parameters:</h5>
|
3251 |
|
3252 |
|
3253 | <table class="params">
|
3254 | <thead>
|
3255 | <tr>
|
3256 |
|
3257 | <th>Name</th>
|
3258 |
|
3259 |
|
3260 | <th>Type</th>
|
3261 |
|
3262 |
|
3263 |
|
3264 |
|
3265 |
|
3266 | <th class="last">Description</th>
|
3267 | </tr>
|
3268 | </thead>
|
3269 |
|
3270 | <tbody>
|
3271 |
|
3272 |
|
3273 | <tr>
|
3274 |
|
3275 | <td class="name"><code>value</code></td>
|
3276 |
|
3277 |
|
3278 | <td class="type">
|
3279 |
|
3280 |
|
3281 | <span class="param-type"><code>Object</code></span>
|
3282 |
|
3283 |
|
3284 |
|
3285 | </td>
|
3286 |
|
3287 |
|
3288 |
|
3289 |
|
3290 |
|
3291 | <td class="description last">
|
3292 | <p>a valid AST object. Other operations will act<br>in an undefined manner should this object not be a valid AST</p>
|
3293 |
|
3294 | </td>
|
3295 | </tr>
|
3296 |
|
3297 |
|
3298 | </tbody>
|
3299 | </table>
|
3300 |
|
3301 |
|
3302 |
|
3303 |
|
3304 |
|
3305 |
|
3306 |
|
3307 |
|
3308 |
|
3309 |
|
3310 |
|
3311 |
|
3312 |
|
3313 |
|
3314 |
|
3315 |
|
3316 | </div>
|
3317 |
|
3318 |
|
3319 | <div class="section-method">
|
3320 |
|
3321 |
|
3322 |
|
3323 | <h4 class="name" id="%E2%AC%87%EF%B8%8E%E2%A0%80ast"><span class="type-signature"></span>⬇︎⠀ast<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4>
|
3324 |
|
3325 |
|
3326 |
|
3327 |
|
3328 |
|
3329 | <div class="description">
|
3330 | <p>Getter that retrieves the abstract syntax tree created by <code>graphql.parse</code><br>when it is presented with a valid string of IDL.</p>
|
3331 | </div>
|
3332 |
|
3333 |
|
3334 |
|
3335 |
|
3336 |
|
3337 | <dl class="details">
|
3338 |
|
3339 |
|
3340 |
|
3341 |
|
3342 |
|
3343 |
|
3344 |
|
3345 |
|
3346 |
|
3347 |
|
3348 |
|
3349 |
|
3350 |
|
3351 |
|
3352 |
|
3353 |
|
3354 |
|
3355 |
|
3356 |
|
3357 |
|
3358 |
|
3359 |
|
3360 |
|
3361 |
|
3362 |
|
3363 |
|
3364 | <dt class="tag-source">Source:</dt>
|
3365 | <dd class="tag-source"><ul class="dummy"><li>
|
3366 | <a href="SyntaxTree.js.html">SyntaxTree.js</a>, <a href="SyntaxTree.js.html#line56">line 56</a>
|
3367 | </li></ul></dd>
|
3368 |
|
3369 |
|
3370 |
|
3371 |
|
3372 |
|
3373 |
|
3374 |
|
3375 | </dl>
|
3376 |
|
3377 |
|
3378 |
|
3379 |
|
3380 |
|
3381 |
|
3382 |
|
3383 |
|
3384 |
|
3385 |
|
3386 |
|
3387 |
|
3388 |
|
3389 |
|
3390 |
|
3391 |
|
3392 |
|
3393 |
|
3394 |
|
3395 |
|
3396 |
|
3397 | <div class="section-returns">
|
3398 | <h5>Returns:</h5>
|
3399 |
|
3400 |
|
3401 |
|
3402 | <dl class="param-type">
|
3403 | <dt>
|
3404 | Type:
|
3405 | </dt>
|
3406 | <dd>
|
3407 |
|
3408 | <span class="param-type"><code>Object</code></span>
|
3409 |
|
3410 |
|
3411 | </dd>
|
3412 | </dl>
|
3413 |
|
3414 |
|
3415 | <div class="param-desc">
|
3416 | <p>a GraphQL AST object</p>
|
3417 | </div>
|
3418 |
|
3419 |
|
3420 | </div>
|
3421 |
|
3422 |
|
3423 |
|
3424 | </div>
|
3425 |
|
3426 |
|
3427 |
|
3428 |
|
3429 |
|
3430 |
|
3431 | </article>
|
3432 |
|
3433 | </section>
|
3434 |
|
3435 |
|
3436 |
|
3437 |
|
3438 | </div>
|
3439 |
|
3440 | <br class="clear">
|
3441 |
|
3442 | <footer>
|
3443 | Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Jun 08 2018 19:28:39 GMT-0700 (PDT) using the Minami theme.
|
3444 | </footer>
|
3445 |
|
3446 | <script>prettyPrint();</script>
|
3447 | <script src="scripts/linenumber.js"></script>
|
3448 | </body>
|
3449 | </html> |
\ | No newline at end of file |