Skip to content

Commit

Permalink
Reference the typedoc in the Readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdillick committed Aug 16, 2024
1 parent 30045bd commit b3dcc6e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/functions/useSyncQuery.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ <h4 class="tsd-anchor-link"><a id="Example" class="tsd-anchor"></a>Example<a hre
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-type">LazyQueryHookOptions</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">NoInfer</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="useSyncQuery.html#useSyncQuery.TData">TData</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">NoInfer</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="useSyncQuery.html#useSyncQuery.TVariables">TVariables</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>Options to be passed to the useLazyQuery hook.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">updateEvent</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#39;set&#39;</span></span><div class="tsd-comment tsd-typography"><p>The event name that triggers a rerender</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">ReactiumSyncState</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">QueryResult</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="useSyncQuery.html#useSyncQuery.TData">TData</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="useSyncQuery.html#useSyncQuery.TVariables">TVariables</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The sync state object.</p>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ReactiumCore/Reactium-GraphQL-Plugin/blob/9f50ab343a393d4caec2a8fd4263ed41797a4a6b/reactium_modules/@reactium/graphql/sdk.ts#L53">sdk.ts:53</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@reactium/graphql</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ReactiumCore/Reactium-GraphQL-Plugin/blob/30045bd0c2856ecabf1b59ceda4c75716b48fc4b/reactium_modules/@reactium/graphql/sdk.ts#L53">sdk.ts:53</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@reactium/graphql</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<pre><code class="jsx"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">gql</span><span class="hl-1">, </span><span class="hl-4">useQuery</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">&#39;@apollo/client&#39;</span><span class="hl-1">;</span><br/><span class="hl-3">import</span><span class="hl-1"> </span><span class="hl-4">React</span><span class="hl-1"> </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">&#39;react&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-6">GET_USERS</span><span class="hl-1"> = </span><span class="hl-0">gql</span><span class="hl-2">`</span><br/><span class="hl-2"> query GetUsers {</span><br/><span class="hl-2"> users {</span><br/><span class="hl-2"> id</span><br/><span class="hl-2"> name</span><br/><span class="hl-2"> email</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> }</span><br/><span class="hl-2">`</span><span class="hl-1">;</span><br/><br/><span class="hl-3">export</span><span class="hl-1"> </span><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-0">UsersList</span><span class="hl-1"> = () </span><span class="hl-5">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">const</span><span class="hl-1"> { </span><span class="hl-6">loading</span><span class="hl-1">, </span><span class="hl-6">error</span><span class="hl-1">, </span><span class="hl-6">data</span><span class="hl-1"> } = </span><span class="hl-0">useQuery</span><span class="hl-1">(</span><span class="hl-6">GET_USERS</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">if</span><span class="hl-1"> (</span><span class="hl-4">loading</span><span class="hl-1">) </span><span class="hl-3">return</span><span class="hl-1"> </span><span class="hl-7">&lt;</span><span class="hl-8">div</span><span class="hl-7">&gt;</span><span class="hl-1">Loading...</span><span class="hl-7">&lt;/</span><span class="hl-8">div</span><span class="hl-7">&gt;</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">else</span><span class="hl-1"> </span><span class="hl-3">if</span><span class="hl-1"> (</span><span class="hl-4">error</span><span class="hl-1">) </span><span class="hl-3">return</span><span class="hl-1"> </span><span class="hl-7">&lt;</span><span class="hl-8">div</span><span class="hl-7">&gt;</span><span class="hl-1">Error: </span><span class="hl-5">{</span><span class="hl-4">error</span><span class="hl-5">}</span><span class="hl-7">&lt;/</span><span class="hl-8">div</span><span class="hl-7">&gt;</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-5">const</span><span class="hl-1"> { </span><span class="hl-6">users</span><span class="hl-1"> } = </span><span class="hl-4">data</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-3">return</span><span class="hl-1"> (</span><br/><span class="hl-1"> </span><span class="hl-7">&lt;</span><span class="hl-8">ul</span><span class="hl-7">&gt;</span><br/><span class="hl-1"> </span><span class="hl-5">{</span><span class="hl-4">users</span><span class="hl-9">.</span><span class="hl-0">map</span><span class="hl-9">(({ </span><span class="hl-4">id</span><span class="hl-9">, </span><span class="hl-4">name</span><span class="hl-9">, </span><span class="hl-4">email</span><span class="hl-9"> }) </span><span class="hl-5">=&gt;</span><span class="hl-9"> (</span><br/><span class="hl-9"> </span><span class="hl-7">&lt;</span><span class="hl-8">li</span><span class="hl-9"> </span><span class="hl-10">key</span><span class="hl-1">=</span><span class="hl-5">{</span><span class="hl-4">id</span><span class="hl-5">}</span><span class="hl-7">&gt;</span><br/><span class="hl-9"> </span><span class="hl-5">{</span><span class="hl-4">name</span><span class="hl-5">}</span><span class="hl-9">: </span><span class="hl-5">{</span><span class="hl-4">email</span><span class="hl-5">}</span><br/><span class="hl-9"> </span><span class="hl-7">&lt;/</span><span class="hl-8">li</span><span class="hl-7">&gt;</span><br/><span class="hl-9"> ))</span><span class="hl-5">}</span><br/><span class="hl-1"> </span><span class="hl-7">&lt;/</span><span class="hl-8">ul</span><span class="hl-7">&gt;</span><br/><span class="hl-1"> );</span><br/><span class="hl-1">};</span>
</code><button type="button">Copy</button></pre>

<a id="md:reactium-specific-hooks" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Reactium Specific Hooks<a href="#md:reactium-specific-hooks" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>When this module is installed in a Reactium project, it exposes it's own React hooks in the @reactium/graphql workspace.</p>
<a id="md:reactium-specific-hooks" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Reactium Specific Hooks<a href="#md:reactium-specific-hooks" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>When this module is installed in a Reactium project, it exposes it's own React hooks in the @reactium/graphql workspace. See the <a href="https://reactiumcore.github.io/Reactium-GraphQL-Plugin/">TypeDoc for this module</a>.</p>
<ul>
<li>
<p><strong>useSyncQuery</strong>: Wraps the Apollo GraphQL query hook, but makes it into a <a href="https://reactiumcore.github.io/reactium-sdk-core/classes/ReactiumSyncState.html">ReactiumSyncState object</a> for easier memory state management. For those used to the Reactium improved <a href="https://reactiumcore.github.io/reactium-sdk-core/functions/useSyncState.html">useSyncState hook</a> for improved component state management, with imperative state updates, as well as EventTarget extensibility and observability.</p>
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const UsersList = () => {

## Reactium Specific Hooks

When this module is installed in a Reactium project, it exposes it's own React hooks in the @reactium/graphql workspace.
When this module is installed in a Reactium project, it exposes it's own React hooks in the @reactium/graphql workspace. See the [TypeDoc for this module](https://reactiumcore.github.io/Reactium-GraphQL-Plugin/).

* **useSyncQuery**: Wraps the Apollo GraphQL query hook, but makes it into a [ReactiumSyncState object](https://reactiumcore.github.io/reactium-sdk-core/classes/ReactiumSyncState.html) for easier memory state management. For those used to the Reactium improved [useSyncState hook](https://reactiumcore.github.io/reactium-sdk-core/functions/useSyncState.html) for improved component state management, with imperative state updates, as well as EventTarget extensibility and observability.

Expand Down

0 comments on commit b3dcc6e

Please sign in to comment.