Skip to content

Commit

Permalink
#38 - Graphql implementation (#121)
Browse files Browse the repository at this point in the history
* feat: added graphql

* chore: graphql schema and resolver loaders added

* chore: added router for express

* chore: added equities gql service

* chore: added schema for equities and indices

* chore: updated package lock file

* chore: missing routes added

* chore: added proper api description

* chore: config for doc generation

* chore: docs updated

* chore: readme updated

* chore: modified index input filter

* chore: Added EOF

* chore: Filter names modified

* chore: docs updated
  • Loading branch information
asrafalih authored Nov 12, 2024
1 parent d827171 commit 494338e
Show file tree
Hide file tree
Showing 46 changed files with 4,322 additions and 1,596 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ nseIndia.getEquityHistoricalData(symbol, range).then(data => {

[getEquityIntradayData](https://hi-imcodeman.github.io/stock-nse-india/classes/index.nseindia.html#getequityintradaydata)

[getEquityOptionChain](https://hi-imcodeman.github.io/stock-nse-india/docs/classes/index.nseindia.html#getequityoptionchain)
[getEquityOptionChain](https://hi-imcodeman.github.io/stock-nse-india/classes/index.nseindia.html#getequityoptionchain)

[getEquitySeries](https://hi-imcodeman.github.io/stock-nse-india/classes/index.nseindia.html#getequityseries)

Expand All @@ -81,9 +81,10 @@ nseIndia.getEquityHistoricalData(symbol, range).then(data => {

[getIndexHistoricalData](https://hi-imcodeman.github.io/stock-nse-india/classes/index.nseindia.html#getindexhistoricaldata)

[getIndexOptionChain](https://hi-imcodeman.github.io/stock-nse-india/docs/classes/index.nseindia.html#getindexoptionchain)
[getIndexOptionChain](https://hi-imcodeman.github.io/stock-nse-india/classes/index.nseindia.html#getindexoptionchain)

[getCommodityOptionChain](https://hi-imcodeman.github.io/stock-nse-india/docs/classes/commodity.nseindia.html#getcommodityoptionchain)
### Commodity Methods
[getCommodityOptionChain](https://hi-imcodeman.github.io/stock-nse-india/classes/index.nseindia.html#getcommodityoptionchain)

### Helper Methods
[getGainersAndLosersByIndex](https://hi-imcodeman.github.io/stock-nse-india/modules/helpers.html#getgainersandlosersbyindex)
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/js/search.js

Large diffs are not rendered by default.

90 changes: 45 additions & 45 deletions docs/classes/index.nseindia.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>NseIndia | stock-nse-india - v1.1.7</title>
<meta name="description" content="Documentation for stock-nse-india - v1.1.7">
<title>NseIndia | stock-nse-india - v1.2.0</title>
<meta name="description" content="Documentation for stock-nse-india - v1.2.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
<script async src="../assets/js/search.js" id="search-script"></script>
Expand All @@ -23,7 +23,7 @@
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">stock-nse-india - v1.1.7</a>
<a href="../index.html" class="title">stock-nse-india - v1.2.0</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
Expand Down Expand Up @@ -52,7 +52,7 @@
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../modules.html">stock-nse-india - v1.1.7</a>
<a href="../modules.html">stock-nse-india - v1.2.0</a>
</li>
<li>
<a href="../modules/index.html">index</a>
Expand Down Expand Up @@ -90,6 +90,7 @@ <h3>Constructors</h3>
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class"><a href="index.nseindia.html#getallstocksymbols" class="tsd-kind-icon">get<wbr>All<wbr>Stock<wbr>Symbols</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="index.nseindia.html#getcommodityoptionchain" class="tsd-kind-icon">get<wbr>Commodity<wbr>Option<wbr>Chain</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="index.nseindia.html#getdata" class="tsd-kind-icon">get<wbr>Data</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="index.nseindia.html#getdatabyendpoint" class="tsd-kind-icon">get<wbr>Data<wbr>ByEndpoint</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="index.nseindia.html#getequitycorporateinfo" class="tsd-kind-icon">get<wbr>Equity<wbr>Corporate<wbr>Info</a></li>
Expand All @@ -103,7 +104,6 @@ <h3>Methods</h3>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="index.nseindia.html#getindexhistoricaldata" class="tsd-kind-icon">get<wbr>Index<wbr>Historical<wbr>Data</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="index.nseindia.html#getindexintradaydata" class="tsd-kind-icon">get<wbr>Index<wbr>Intraday<wbr>Data</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="index.nseindia.html#getindexoptionchain" class="tsd-kind-icon">get<wbr>Index<wbr>Option<wbr>Chain</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="index.nseindia.html#getcommodityoptionchain" class="tsd-kind-icon">get<wbr>Commodity<wbr>Option<wbr>Chain</a></li>
</ul>
</section>
</div>
Expand Down Expand Up @@ -138,14 +138,37 @@ <h3>get<wbr>All<wbr>Stock<wbr>Symbols</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/02b895e/src/index.ts#L116">index.ts:116</a></li>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/d62d8fe/src/index.ts#L116">index.ts:116</a></li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>List of NSE equity symbols</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="getcommodityoptionchain" class="tsd-anchor"></a>
<h3>get<wbr>Commodity<wbr>Option<wbr>Chain</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">get<wbr>Commodity<wbr>Option<wbr>Chain<span class="tsd-signature-symbol">(</span>symbol<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/interface.optionchaindata.html" class="tsd-signature-type" data-tsd-kind="Interface">OptionChainData</a><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/d62d8fe/src/index.ts#L251">index.ts:251</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>symbol: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/interface.optionchaindata.html" class="tsd-signature-type" data-tsd-kind="Interface">OptionChainData</a><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="getdata" class="tsd-anchor"></a>
<h3>get<wbr>Data</h3>
Expand All @@ -156,7 +179,7 @@ <h3>get<wbr>Data</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/02b895e/src/index.ts#L77">index.ts:77</a></li>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/d62d8fe/src/index.ts#L77">index.ts:77</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -183,7 +206,7 @@ <h3>get<wbr>Data<wbr>ByEndpoint</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/02b895e/src/index.ts#L109">index.ts:109</a></li>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/d62d8fe/src/index.ts#L109">index.ts:109</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -206,7 +229,7 @@ <h3>get<wbr>Equity<wbr>Corporate<wbr>Info</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/02b895e/src/index.ts#L143">index.ts:143</a></li>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/d62d8fe/src/index.ts#L143">index.ts:143</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -229,7 +252,7 @@ <h3>get<wbr>Equity<wbr>Details</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/02b895e/src/index.ts#L125">index.ts:125</a></li>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/d62d8fe/src/index.ts#L125">index.ts:125</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -252,7 +275,7 @@ <h3>get<wbr>Equity<wbr>Historical<wbr>Data</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/02b895e/src/index.ts#L167">index.ts:167</a></li>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/d62d8fe/src/index.ts#L167">index.ts:167</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -278,7 +301,7 @@ <h3>get<wbr>Equity<wbr>Intraday<wbr>Data</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/02b895e/src/index.ts#L153">index.ts:153</a></li>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/d62d8fe/src/index.ts#L153">index.ts:153</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -304,7 +327,7 @@ <h3>get<wbr>Equity<wbr>Option<wbr>Chain</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/02b895e/src/index.ts#L241">index.ts:241</a></li>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/d62d8fe/src/index.ts#L241">index.ts:241</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -327,7 +350,7 @@ <h3>get<wbr>Equity<wbr>Series</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/02b895e/src/index.ts#L186">index.ts:186</a></li>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/d62d8fe/src/index.ts#L186">index.ts:186</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -350,7 +373,7 @@ <h3>get<wbr>Equity<wbr>Stock<wbr>Indices</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/02b895e/src/index.ts#L195">index.ts:195</a></li>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/d62d8fe/src/index.ts#L195">index.ts:195</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -373,7 +396,7 @@ <h3>get<wbr>Equity<wbr>Trade<wbr>Info</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/02b895e/src/index.ts#L133">index.ts:133</a></li>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/d62d8fe/src/index.ts#L133">index.ts:133</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -396,7 +419,7 @@ <h3>get<wbr>Index<wbr>Historical<wbr>Data</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/02b895e/src/index.ts#L216">index.ts:216</a></li>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/d62d8fe/src/index.ts#L216">index.ts:216</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -422,7 +445,7 @@ <h3>get<wbr>Index<wbr>Intraday<wbr>Data</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/02b895e/src/index.ts#L204">index.ts:204</a></li>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/d62d8fe/src/index.ts#L204">index.ts:204</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -448,30 +471,7 @@ <h3>get<wbr>Index<wbr>Option<wbr>Chain</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/02b895e/src/index.ts#L231">index.ts:231</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>indexSymbol: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/interface.optionchaindata.html" class="tsd-signature-type" data-tsd-kind="Interface">OptionChainData</a><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="getcommodityoptionchain" class="tsd-anchor"></a>
<h3>get<wbr>Commodity<wbr>Option<wbr>Chain</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">get<wbr>Commodity<wbr>Option<wbr>Chain<span class="tsd-signature-symbol">(</span>indexSymbol<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/interface.optionchaindata.html" class="tsd-signature-type" data-tsd-kind="Interface">OptionChainData</a><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/02b895e/src/index.ts#L231">index.ts:231</a></li>
<li>Defined in <a href="https://github.com/hi-imcodeman/stock-nse-india/blob/d62d8fe/src/index.ts#L231">index.ts:231</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -519,6 +519,9 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="index.nseindia.html#getallstocksymbols" class="tsd-kind-icon">get<wbr>All<wbr>Stock<wbr>Symbols</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="index.nseindia.html#getcommodityoptionchain" class="tsd-kind-icon">get<wbr>Commodity<wbr>Option<wbr>Chain</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="index.nseindia.html#getdata" class="tsd-kind-icon">get<wbr>Data</a>
</li>
Expand Down Expand Up @@ -558,9 +561,6 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="index.nseindia.html#getindexoptionchain" class="tsd-kind-icon">get<wbr>Index<wbr>Option<wbr>Chain</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="commodity.nseindia.html#getcommodityoptionchain" class="tsd-kind-icon">get<wbr>Commodity<wbr>Option<wbr>Chain</a>
</li>
</ul>
</li>
</ul>
Expand Down
Loading

0 comments on commit 494338e

Please sign in to comment.