Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeh committed Jul 18, 2020
1 parent 5e99baa commit d98e22a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/404.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="icon" href="/gql/favicon.ico"/><title>404 - not found</title><meta name="description" content="404 - not found."/><script type="application/ld+json">{"@context":"http://schema.org","@type":"website","name":"404 - not found"}</script><link rel="stylesheet" href="/gql/magic.css?IaHIeqgKAX" integrity="sha384-IaHIeqgKAXPVltBUYtWuOgSOMY7fbiwUvGRCvcfPxynVAxho7i9ZJjKQFT9myZ2v" crossorigin="anonymous"/></head><body><a class="SkipLink" href="/gql/#page">Skip to Content</a><main id="Magic"><div class="Wrapper"><header class="Header"><div><a class="Logo" href="/gql/"><svg viewBox="0 0 512 444"><path d="M512 444L256 0 0 444z" fill="#663695"></path><circle cx="256" cy="294" r="130" fill="#fff"></circle><circle cx="256" cy="281" r="40" fill="#663695"></circle><path d="M256 350v44m24-44l1 13c1 27 29 27 29-7m-160-72s46-47 106-47c59 0 106 47 106 47s-47 43-106 43c-60 0-106-43-106-43zm65-75a134 134 0 0189 2" class="stroke"></path><path d="M256 81v53m184 270l-43-29M72 404l43-29" class="stroke white"></path></svg></a><p>@magic-libraries/gql</p><nav class="Menu"><ul><li><a href="/gql/#installation">installation</a></li><li><a href="/gql/#usage">usage</a></li><li><a href="/gql/#source">source</a></li></ul></nav></div></header><div class="Page" id="page"><div>404 - not found.</div></div><footer class="Footer"><div class="Container"><div class="Credits">made with a few bits of <a target="_blank" rel="noopener" href="https://magic.github.io/">magic</a></div></div></footer></div></main><script src="/gql/magic.js?mfJpCd2PbP" integrity="sha384-mfJpCd2PbPXE+pLVgu+pMqU4zLsQavAaIR10eiSNBsPgnCmjfgnCeWbuN+NIF5OK" crossorigin="anonymous"></script></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="icon" href="/gql/favicon.ico"/><title>404 - not found</title><meta name="description" content="404 - not found."/><script type="application/ld+json">{"@context":"http://schema.org","@type":"website","name":"404 - not found"}</script><link rel="stylesheet" href="/gql/magic.css?hdOB3ujppK" integrity="sha384-hdOB3ujppK9vk/35z7SqQe9J8B7pQ3tVL4gVjMS7lhQ9PpMpCZLMYjGO6fEbDqSk" crossorigin="anonymous"/></head><body><a class="SkipLink" href="/gql/#page">Skip to Content</a><main id="Magic"><div class="Wrapper"><header class="Header"><div><a class="Logo" href="/gql/"><svg viewBox="0 0 512 444"><path d="M512 444L256 0 0 444z" fill="#663695"></path><circle cx="256" cy="294" r="130" fill="#fff"></circle><circle cx="256" cy="281" r="40" fill="#663695"></circle><path d="M256 350v44m24-44l1 13c1 27 29 27 29-7m-160-72s46-47 106-47c59 0 106 47 106 47s-47 43-106 43c-60 0-106-43-106-43zm65-75a134 134 0 0189 2" class="stroke"></path><path d="M256 81v53m184 270l-43-29M72 404l43-29" class="stroke white"></path></svg></a><p>@magic-libraries/gql</p><nav class="Menu"><ul><li><a href="/gql/#installation">installation</a></li><li><a href="/gql/#usage">usage</a></li><li><a href="/gql/#source">source</a></li></ul></nav></div></header><div class="Page" id="page"><div>404 - not found.</div></div><footer class="Footer"><div class="Container"><div class="Credits">made with a few bits of <a target="_blank" rel="noopener" href="https://magic.github.io/">magic</a></div></div></footer></div></main><script src="/gql/magic.js?TcRB0E2U1V" integrity="sha384-TcRB0E2U1Vdjfxu4Xr/VHOxc1Ym+7YriidrOiLkYg6HQJP1C+A60FCcBYhOud660" crossorigin="anonymous"></script></body></html>
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="icon" href="/gql/favicon.ico"/><title>@magic-libraries/gql</title><meta name="description" content="graphql query handler for @magic"/><script type="application/ld+json">{"@context":"http://schema.org","@type":"website","name":"@magic-libraries/gql"}</script><link rel="stylesheet" href="/gql/magic.css?IaHIeqgKAX" integrity="sha384-IaHIeqgKAXPVltBUYtWuOgSOMY7fbiwUvGRCvcfPxynVAxho7i9ZJjKQFT9myZ2v" crossorigin="anonymous"/></head><body><a class="SkipLink" href="/gql/#page">Skip to Content</a><main id="Magic"><div class="Wrapper"><header class="Header"><div><a class="Logo" href="/gql/"><svg viewBox="0 0 512 444"><path d="M512 444L256 0 0 444z" fill="#663695"></path><circle cx="256" cy="294" r="130" fill="#fff"></circle><circle cx="256" cy="281" r="40" fill="#663695"></circle><path d="M256 350v44m24-44l1 13c1 27 29 27 29-7m-160-72s46-47 106-47c59 0 106 47 106 47s-47 43-106 43c-60 0-106-43-106-43zm65-75a134 134 0 0189 2" class="stroke"></path><path d="M256 81v53m184 270l-43-29M72 404l43-29" class="stroke white"></path></svg></a><p>@magic-libraries/gql</p><nav class="Menu"><ul><li><a href="/gql/#installation">installation</a></li><li><a href="/gql/#usage">usage</a></li><li><a href="/gql/#source">source</a></li></ul></nav></div></header><div class="Page" id="page"><h1 id="magic-librariesgql">@magic-libraries/gql</h1><a href="https://magic.github.io/core" target="_blank" rel="noopener">@magic</a>-client gql library.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="icon" href="/gql/favicon.ico"/><title>@magic-libraries/gql</title><meta name="description" content="graphql query handler for @magic"/><script type="application/ld+json">{"@context":"http://schema.org","@type":"website","name":"@magic-libraries/gql"}</script><link rel="stylesheet" href="/gql/magic.css?hdOB3ujppK" integrity="sha384-hdOB3ujppK9vk/35z7SqQe9J8B7pQ3tVL4gVjMS7lhQ9PpMpCZLMYjGO6fEbDqSk" crossorigin="anonymous"/></head><body><a class="SkipLink" href="/gql/#page">Skip to Content</a><main id="Magic"><div class="Wrapper"><header class="Header"><div><a class="Logo" href="/gql/"><svg viewBox="0 0 512 444"><path d="M512 444L256 0 0 444z" fill="#663695"></path><circle cx="256" cy="294" r="130" fill="#fff"></circle><circle cx="256" cy="281" r="40" fill="#663695"></circle><path d="M256 350v44m24-44l1 13c1 27 29 27 29-7m-160-72s46-47 106-47c59 0 106 47 106 47s-47 43-106 43c-60 0-106-43-106-43zm65-75a134 134 0 0189 2" class="stroke"></path><path d="M256 81v53m184 270l-43-29M72 404l43-29" class="stroke white"></path></svg></a><p>@magic-libraries/gql</p><nav class="Menu"><ul><li><a href="/gql/#installation">installation</a></li><li><a href="/gql/#usage">usage</a></li><li><a href="/gql/#source">source</a></li></ul></nav></div></header><div class="Page" id="page"><h1 id="magic-librariesgql">@magic-libraries/gql</h1><a href="https://magic.github.io/core" target="_blank" rel="noopener">@magic</a>-client gql library.
<p>graphql query handler for @magic</p><ul class="GitBadges"><li><a href="https://www.npmjs.com/package/@magic-libraries/gql" target="_blank" rel="noopener"><img src="https://img.shields.io/npm/v/@magic-libraries/gql?color=blue" height="23" role="presentation" alt="" loading="lazy"/></a></li><li><img src="https://img.shields.io/node/v/@magic-libraries/gql?color=blue" height="23" role="presentation" alt="" loading="lazy"/></li><li><img src="https://img.shields.io/npm/l/@magic-libraries/gql?color=blue" height="23" role="presentation" alt="" loading="lazy"/></li><li><a href="https://travis-ci.com/magic-libraries/gql" target="_blank" rel="noopener"><img src="https://img.shields.io/travis/com/magic-libraries/gql/master" height="23" role="presentation" alt="" loading="lazy"/></a></li><li><a href="https://ci.appveyor.com/project/magiclibraries/gql/branch/master" target="_blank" rel="noopener"><img src="https://img.shields.io/appveyor/ci/magiclibraries/gql/master.svg" height="23" role="presentation" alt="" loading="lazy"/></a></li><li><a href="https://coveralls.io/github/magic-libraries/gql" target="_blank" rel="noopener"><img src="https://img.shields.io/coveralls/github/magic-libraries/gql/master.svg" height="23" role="presentation" alt="" loading="lazy"/></a></li><li><a href="https://snyk.io/test/github/magic-libraries/gql" target="_blank" rel="noopener"><img src="https://img.shields.io/snyk/vulnerabilities/github/magic-libraries/gql.svg" height="23" role="presentation" alt="" loading="lazy"/></a></li></ul><h3 id="installation">installation</h3><div class="Pre"><div class="menu"><button>copy</button></div><pre><code class="line"><span class="keyword">npm</span> <span class="keyword">install</span> --save-exact @magic-libraries/gql</code></pre></div><h3 id="usage">usage</h3><p>in a page/component, just use the lib.gql functions</p><div class="Pre lines"><div class="menu"><button>copy</button></div><pre><code class="line"><span class="keyword">const</span> query = lib.gql(`</code><code class="line">query getHuman($id: Int = 3) {</code><code class="line"> human(id: $id) {</code><code class="line"> name</code><code class="line"> height</code><code class="line"> }</code><code class="line">}`)</code><code class="line"></code><code class="line"><span class="keyword">const</span> jsonString = query({ id: 1 })</code></pre></div><p>jsonString now is valid json:</p><div class="Pre lines"><div class="menu"><button>copy</button></div><pre><code class="line">{</code><code class="line"> <span class="string">&#39;query&#39;</span>: `query getHuman($id: Int = 3) {</code><code class="line"> human(id: $id) {</code><code class="line"> name</code><code class="line"> height</code><code class="line"> }</code><code class="line"> }`,</code><code class="line"> <span class="string">&#39;variables&#39;</span>: { id: <span class="string">&#39;1&#39;</span> },</code><code class="line"> <span class="string">&#39;operationName&#39;</span>:<span class="string">&#39;getHuman&#39;</span></code><code class="line">}</code></pre></div><h3 id="source">source</h3><p>the source for this page is in the
<a href="https://github.com/magic-libraries/gql/tree/master/example" target="_blank" rel="noopener">example directory</a>,
and gets built and published to github using
<a href="https://github.com/magic/core" target="_blank" rel="noopener">@magic/core</a></p></div><footer class="Footer"><div class="Container"><div class="Credits">made with a few bits of <a target="_blank" rel="noopener" href="https://magic.github.io/">magic</a></div></div></footer></div></main><script src="/gql/magic.js?mfJpCd2PbP" integrity="sha384-mfJpCd2PbPXE+pLVgu+pMqU4zLsQavAaIR10eiSNBsPgnCmjfgnCeWbuN+NIF5OK" crossorigin="anonymous"></script></body></html>
<a href="https://github.com/magic/core" target="_blank" rel="noopener">@magic/core</a></p></div><footer class="Footer"><div class="Container"><div class="Credits">made with a few bits of <a target="_blank" rel="noopener" href="https://magic.github.io/">magic</a></div></div></footer></div></main><script src="/gql/magic.js?TcRB0E2U1V" integrity="sha384-TcRB0E2U1Vdjfxu4Xr/VHOxc1Ym+7YriidrOiLkYg6HQJP1C+A60FCcBYhOud660" crossorigin="anonymous"></script></body></html>
Loading

0 comments on commit d98e22a

Please sign in to comment.