UNPKG

@gapi/angular-client

Version:

##### This module is intended to be used with [Gapi Server](https://github.com/Stradivario/gapi) but can be used with every GraphQL Server

449 lines (369 loc) 19.5 kB
<!doctype html> <html class="no-js" lang=""> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title>gapi-angular-client</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" type="image/x-icon" href="../images/favicon.ico"> <link rel="stylesheet" href="../styles/style.css"> </head> <body> <div class="navbar navbar-default navbar-fixed-top visible-xs"> <a href="../" class="navbar-brand">gapi-angular-client</a> <button type="button" class="btn btn-default btn-menu fa fa-bars" id="btn-menu"></button> </div> <div class="xs-menu menu" id="mobile-menu"> <div id="book-search-input" role="search"> <input type="text" placeholder="Type to search"> </div> <nav> <ul class="list"> <li class="title"> <a href="../index.html">gapi-angular-client</a> </li> <li class="divider"></li> <li class="chapter"> <a data-type="chapter-link" href="../index.html"><span class="fa fa-home"></span>Getting started</a> <ul class="links"> <li class="link"> <a href="../" > <span class="fa fa-th"></span>Overview </a> </li> </ul> </li> <li class="chapter"> <a data-type="chapter-link" href="../modules.html" > <div class="menu-toggler linked" data-toggle="collapse" data-target="#xs-modules-links" > <span class="fa fa-archive"></span> <span class="link-name">Modules</span> <span class="fa fa-angle-down"></span> </div> </a> <ul class="links collapse " id="xs-modules-links" > <li class="link"> <a href="../modules/GapiApolloModule.html" data-type="entity-link" class="active" >GapiApolloModule</a> </li> </ul> </li> <li class="chapter"> <div class="simple menu-toggler" data-toggle="collapse" data-target="#xs-injectables-links" > <span class="fa fa-long-arrow-down"></span> <span>Injectables</span> <span class="fa fa-angle-down"></span> </div> <ul class="links collapse " id="xs-injectables-links" > <li class="link"> <a href="../injectables/GapiApolloService.html" >GapiApolloService</a> </li> </ul> </li> <li class="chapter"> <div class="simple menu-toggler" data-toggle="collapse" data-target="#xs-interfaces-links" > <span class="fa fa-info"></span> <span>Interfaces</span> <span class="fa fa-angle-down"></span> </div> <ul class="links collapse " id="xs-interfaces-links" > <li class="link"> <a href="../interfaces/GapiApolloClientOptions.html" >GapiApolloClientOptions</a> </li> </ul> </li> <li class="chapter"> <div class="simple menu-toggler" data-toggle="collapse" data-target="#xs-miscellaneous-links" > <span class="fa fa-cubes"></span> <span>Miscellaneous</span> <span class="fa fa-angle-down"></span> </div> <ul class="links collapse " id="xs-miscellaneous-links" > <li class="link"> <a href="../miscellaneous/variables.html" data-type="entity-link" >Variables</a> </li> </ul> </li> <li class="chapter"> <a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a> </li> </ul> </nav> </div> <div class="container-fluid main"> <div class="row main"> <div class="hidden-xs menu"> <nav> <ul class="list"> <li class="title"> <a href="../index.html">gapi-angular-client</a> </li> <li class="divider"></li> <div id="book-search-input" role="search"> <input type="text" placeholder="Type to search"> </div> <li class="chapter"> <a data-type="chapter-link" href="../index.html"><span class="fa fa-home"></span>Getting started</a> <ul class="links"> <li class="link"> <a href="../" > <span class="fa fa-th"></span>Overview </a> </li> </ul> </li> <li class="chapter"> <a data-type="chapter-link" href="../modules.html" > <div class="menu-toggler linked" data-toggle="collapse" data-target="#modules-links" > <span class="fa fa-archive"></span> <span class="link-name">Modules</span> <span class="fa fa-angle-down"></span> </div> </a> <ul class="links collapse " id="modules-links" > <li class="link"> <a href="../modules/GapiApolloModule.html" data-type="entity-link" class="active" >GapiApolloModule</a> </li> </ul> </li> <li class="chapter"> <div class="simple menu-toggler" data-toggle="collapse" data-target="#injectables-links" > <span class="fa fa-long-arrow-down"></span> <span>Injectables</span> <span class="fa fa-angle-down"></span> </div> <ul class="links collapse " id="injectables-links" > <li class="link"> <a href="../injectables/GapiApolloService.html" >GapiApolloService</a> </li> </ul> </li> <li class="chapter"> <div class="simple menu-toggler" data-toggle="collapse" data-target="#interfaces-links" > <span class="fa fa-info"></span> <span>Interfaces</span> <span class="fa fa-angle-down"></span> </div> <ul class="links collapse " id="interfaces-links" > <li class="link"> <a href="../interfaces/GapiApolloClientOptions.html" >GapiApolloClientOptions</a> </li> </ul> </li> <li class="chapter"> <div class="simple menu-toggler" data-toggle="collapse" data-target="#miscellaneous-links" > <span class="fa fa-cubes"></span> <span>Miscellaneous</span> <span class="fa fa-angle-down"></span> </div> <ul class="links collapse " id="miscellaneous-links" > <li class="link"> <a href="../miscellaneous/variables.html" data-type="entity-link" >Variables</a> </li> </ul> </li> <li class="chapter"> <a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a> </li> </ul> </nav> </div> <div class="content module"> <div class="content-data"> <ol class="breadcrumb"> <li>Modules</li> <li>GapiApolloModule</li> </ol> <div class="text-center"> <div id="module-graph-svg"> <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <!-- Generated by graphviz version 2.40.1 (20161225.0304) --> <!-- Title: dependencies Pages: 1 --> <svg width="504pt" height="211pt" viewBox="0.00 0.00 504.00 211.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 207)"> <title>dependencies</title> <polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-207 500,-207 500,4 -4,4"/> <text text-anchor="start" x="227.0091" y="-42.4" font-family="sans-serif" font-weight="bold" font-size="14.00" fill="#000000">Legend</text> <polygon fill="#ffffb3" stroke="transparent" points="14,-10 14,-30 34,-30 34,-10 14,-10"/> <text text-anchor="start" x="37.629" y="-15.4" font-family="sans-serif" font-size="14.00" fill="#000000"> &#160;Declarations</text> <polygon fill="#8dd3c7" stroke="transparent" points="127,-10 127,-30 147,-30 147,-10 127,-10"/> <text text-anchor="start" x="150.7251" y="-15.4" font-family="sans-serif" font-size="14.00" fill="#000000"> &#160;Module</text> <polygon fill="#80b1d3" stroke="transparent" points="213,-10 213,-30 233,-30 233,-10 213,-10"/> <text text-anchor="start" x="236.7812" y="-15.4" font-family="sans-serif" font-size="14.00" fill="#000000"> &#160;Bootstrap</text> <polygon fill="#fdb462" stroke="transparent" points="310,-10 310,-30 330,-30 330,-10 310,-10"/> <text text-anchor="start" x="333.6732" y="-15.4" font-family="sans-serif" font-size="14.00" fill="#000000"> &#160;Providers</text> <polygon fill="#fb8072" stroke="transparent" points="406,-10 406,-30 426,-30 426,-10 406,-10"/> <text text-anchor="start" x="429.7258" y="-15.4" font-family="sans-serif" font-size="14.00" fill="#000000"> &#160;Exports</text> <g id="clust1" class="cluster"> <title>cluster_GapiApolloModule</title> <polygon fill="none" stroke="#000000" stroke-dasharray="1,5" points="146,-70 146,-195 350,-195 350,-70 146,-70"/> </g> <g id="clust6" class="cluster"> <title>cluster_GapiApolloModule_providers</title> <polygon fill="none" stroke="#000000" points="154,-78 154,-130 342,-130 342,-78 154,-78"/> </g> <!-- GapiApolloService --> <g id="node1" class="node"> <title>GapiApolloService</title> <ellipse fill="#fdb462" stroke="#000000" cx="248" cy="-104" rx="85.6725" ry="18"/> <text text-anchor="middle" x="248" y="-99.8" font-family="Times,serif" font-size="14.00" fill="#000000">GapiApolloService</text> </g> <!-- GapiApolloModule --> <g id="node2" class="node"> <title>GapiApolloModule</title> <polygon fill="#8dd3c7" stroke="#000000" points="310.6499,-187 307.6499,-191 286.6499,-191 283.6499,-187 185.3501,-187 185.3501,-151 310.6499,-151 310.6499,-187"/> <text text-anchor="middle" x="248" y="-164.8" font-family="Times,serif" font-size="14.00" fill="#000000">GapiApolloModule</text> </g> <!-- GapiApolloService&#45;&gt;GapiApolloModule --> <g id="edge1" class="edge"> <title>GapiApolloService&#45;&gt;GapiApolloModule</title> <path fill="none" stroke="#000000" d="M248,-122.1061C248,-122.1061 248,-140.991 248,-140.991"/> <polygon fill="#000000" stroke="#000000" points="244.5001,-140.9909 248,-150.991 251.5001,-140.991 244.5001,-140.9909"/> </g> </g> </svg> </div> <div class="btn-group"> <button id="zoom-in" class="btn btn-default btn-sm">Zoom in</button> <button id="reset" class="btn btn-default btn-sm">Reset</button> <button id="zoom-out" class="btn btn-default btn-sm">Zoom out</button> </div> </div> <script src="../js/libs/svg-pan-zoom.min.js"></script> <script src="../js/svg-pan-zoom.controls.js"></script> <ul class="nav nav-tabs" role="tablist"> <li class="active"> <a href="#info" id="info-tab" role="tab" data-toggle="tab" data-link="info">Info</a> </li> <li> <a href="#source" role="tab" id="source-tab" data-toggle="tab" data-link="source">Source</a> </li> </ul> <div class="tab-content"> <div class="tab-pane fade active in" id="info"> <p class="comment"> <h3>File</h3> </p> <p class="comment"> <code>src/index.ts</code> </p> <div class="container-fluid module"> <div class="row"> <div class="col-sm-3"> <h3>Providers<a href="https://angular.io/api/core/NgModule#providers" target="_blank" title="Official documentation about module providers"><span class="fa fa-info-circle"></a></h3> <ul class="list-group"> <li class="list-group-item"> <a href="../injectables/GapiApolloService.html" >GapiApolloService</a> </li> </ul> </div> </div> </div> </div> <div class="tab-pane fade tab-source-code" id="source"> <pre class="line-numbers"><code class="language-typescript">import { NgModule, ModuleWithProviders } from &#x27;@angular/core&#x27;; import { CommonModule } from &#x27;@angular/common&#x27;; import { GapiApolloService } from &#x27;./services/apollo.service&#x27;; import { GapiApolloClientOptions, GAPI_APOLLO_MODULE_CONFIG, GAPI_APOLLO_MODULE_DI_CONFIG } from &#x27;./config&#x27;; import { HttpClientModule } from &#x27;@angular/common/http&#x27;; import { ApolloModule } from &#x27;apollo-angular&#x27;; import { HttpLinkModule } from &#x27;apollo-angular-link-http&#x27;; @NgModule({ imports: [ CommonModule, HttpClientModule, ApolloModule, HttpLinkModule, ], providers: [ GapiApolloService ], exports: [ ApolloModule, HttpLinkModule, HttpClientModule ] }) export class GapiApolloModule { public static forRoot(config: GapiApolloClientOptions): ModuleWithProviders { return { ngModule: GapiApolloModule, providers: [ { provide: GAPI_APOLLO_MODULE_CONFIG, useValue: config || GAPI_APOLLO_MODULE_DI_CONFIG }, GapiApolloService ] }; } } export * from &#x27;./config&#x27;; export * from &#x27;./services&#x27;; </code></pre> </div> </div> </div><div class="search-results"> <div class="has-results"> <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1> <ul class="search-results-list"></ul> </div> <div class="no-results"> <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1> </div> </div> </div> </div> </div> <script src="../js/libs/bootstrap-native.js"></script> <script src="../js/libs/es6-shim.min.js"></script> <script src="../js/libs/EventDispatcher.js"></script> <script src="../js/libs/promise.min.js"></script> <script src="../js/libs/zepto.min.js"></script> <script src="../js/compodoc.js"></script> <script>var COMPODOC_CURRENT_PAGE_DEPTH = 1;</script> <script src="../js/search/search.js"></script> <script src="../js/search/lunr.min.js"></script> <script src="../js/search/search-lunr.js"></script> <script src="../js/tabs.js"></script> <script src="../js/menu.js"></script> <script src="../js/libs/prism.js"></script> <script src="../js/sourceCode.js"></script> <script src="../js/search/search_index.js"></script> </body> </html>