This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/apisix-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 0754a6f  Deploy to GitHub pages
0754a6f is described below

commit 0754a6fc0ea6b3e183f6a0c24197dadae604ea9a
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Dec 10 09:05:00 2020 +0000

    Deploy to GitHub pages
---
 apisix/how-to-build.html           |  2 ++
 apisix/how-to-build/index.html     |  2 ++
 apisix/router-radixtree.html       | 47 ++++++++++++++++++++++++++++++++++++++
 apisix/router-radixtree/index.html | 47 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 98 insertions(+)

diff --git a/apisix/how-to-build.html b/apisix/how-to-build.html
index 3dec2c4..e3ad859 100644
--- a/apisix/how-to-build.html
+++ b/apisix/how-to-build.html
@@ -87,6 +87,8 @@ Makefile rules:
     test:             Run the test case
     license-check:    Check Lua source code for Apache License
 </code></pre>
+<p>Environment variable can be used to configure APISIX. Please take a look at 
<code>conf/config.yaml</code> to
+see how to do it.</p>
 <h2><a class="anchor" aria-hidden="true" id="4-test"></a><a href="#4-test" 
aria-hidden="true" class="hash-link"><svg class="hash-link-icon" 
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" 
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
 <ol>
 <li>Install perl's package manager <code>cpanminus</code> first</li>
diff --git a/apisix/how-to-build/index.html b/apisix/how-to-build/index.html
index 3dec2c4..e3ad859 100644
--- a/apisix/how-to-build/index.html
+++ b/apisix/how-to-build/index.html
@@ -87,6 +87,8 @@ Makefile rules:
     test:             Run the test case
     license-check:    Check Lua source code for Apache License
 </code></pre>
+<p>Environment variable can be used to configure APISIX. Please take a look at 
<code>conf/config.yaml</code> to
+see how to do it.</p>
 <h2><a class="anchor" aria-hidden="true" id="4-test"></a><a href="#4-test" 
aria-hidden="true" class="hash-link"><svg class="hash-link-icon" 
aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" 
width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 
3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 
5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 
2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2. [...]
 <ol>
 <li>Install perl's package manager <code>cpanminus</code> first</li>
diff --git a/apisix/router-radixtree.html b/apisix/router-radixtree.html
index afaf365..0c02ab4 100644
--- a/apisix/router-radixtree.html
+++ b/apisix/router-radixtree.html
@@ -80,6 +80,53 @@ here is an simple example:</p>
 }'
 </code></pre>
 <p>This route will require the request header <code>host</code> equal 
<code>iresty.com</code>, request cookie key <code>_device_id</code> equal 
<code>a66f0cdc4ba2df8c096f74c9110163a9</code> etc.</p>
+<h3><a class="anchor" aria-hidden="true" 
id="how-to-filter-route-by-graphql-attributes"></a><a 
href="#how-to-filter-route-by-graphql-attributes" aria-hidden="true" 
class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" 
version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 
9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 
9zm9-3h-1v1h1c1  [...]
+<p>APISIX supports filtering route by some attributes of graphql. Currently we 
support:</p>
+<ul>
+<li>graphql_operation</li>
+<li>graphql_name</li>
+<li>graphql_root_fields</li>
+</ul>
+<p>For instance, with graphql like this:</p>
+<pre><code class="hljs css language-graphql"><span 
class="hljs-attribute">query</span> getRepo {
+    <span class="hljs-section">owner</span> {
+        <span class="hljs-attribute">name</span>
+    }
+    repo {
+        <span class="hljs-attribute">created</span>
+    }
+}
+</code></pre>
+<ul>
+<li>The <code>graphql_operation</code> is <code>query</code></li>
+<li>The <code>graphql_name</code> is <code>getRepo</code>,</li>
+<li>The <code>graphql_root_fields</code> is <code>[&quot;owner&quot;, 
&quot;repo&quot;]</code></li>
+</ul>
+<p>We can filter such route out with:</p>
+<pre><code class="hljs css language-shell"><span 
class="hljs-meta">$</span><span class="bash"> curl 
http://127.0.0.1:9080/apisix/admin/routes/1 -H <span 
class="hljs-string">'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1'</span> -X PUT 
-i -d <span class="hljs-string">'</span></span>
+{
+    "methods": ["POST"],
+    "uri": "/_graphql",
+    "vars": [
+        ["graphql_operation", "==", "query"],
+        ["graphql_name", "==", "getRepo"],
+        ["graphql_root_fields", "has", "owner"]
+    ],
+    "upstream": {
+        "type": "roundrobin",
+        "nodes": {
+            "39.97.63.215:80": 1
+        }
+    }
+}'
+</code></pre>
+<p>To prevent spending too much time reading invalid graphql request body, we 
only read the first 1 MiB
+data from the request body. This limitation is configured via:</p>
+<pre><code class="hljs css language-yaml"><span 
class="hljs-attr">graphql:</span>
+  <span class="hljs-attr">max_size:</span> <span 
class="hljs-number">1048576</span>
+
+</code></pre>
+<p>If you need to pass a graphql body which is larger than the limitation, you 
can increase the value in <code>conf/config.yaml</code>.</p>
 </span></div></article></div><div class="docs-prevnext"></div></div></div><nav 
class="onPageNav"></nav></div><footer class="nav-footer" id="footer"><section 
class="sitemap"><a href="/" class="nav-home"></a><div><h5>ASF</h5><a 
href="https://www.apache.org/";>Foundation</a><a 
href="https://www.apache.org/licenses/";>License</a><a 
href="http://www.apache.org/events/current-event/";>Events</a><a 
href="https://www.apache.org/security/";>Security</a><a 
href="https://www.apache.org/foundation/spons [...]
                 document.addEventListener('keyup', function(e) {
                   if (e.target !== document.body) {
diff --git a/apisix/router-radixtree/index.html 
b/apisix/router-radixtree/index.html
index afaf365..0c02ab4 100644
--- a/apisix/router-radixtree/index.html
+++ b/apisix/router-radixtree/index.html
@@ -80,6 +80,53 @@ here is an simple example:</p>
 }'
 </code></pre>
 <p>This route will require the request header <code>host</code> equal 
<code>iresty.com</code>, request cookie key <code>_device_id</code> equal 
<code>a66f0cdc4ba2df8c096f74c9110163a9</code> etc.</p>
+<h3><a class="anchor" aria-hidden="true" 
id="how-to-filter-route-by-graphql-attributes"></a><a 
href="#how-to-filter-route-by-graphql-attributes" aria-hidden="true" 
class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" 
version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 
9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 
3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 
9zm9-3h-1v1h1c1  [...]
+<p>APISIX supports filtering route by some attributes of graphql. Currently we 
support:</p>
+<ul>
+<li>graphql_operation</li>
+<li>graphql_name</li>
+<li>graphql_root_fields</li>
+</ul>
+<p>For instance, with graphql like this:</p>
+<pre><code class="hljs css language-graphql"><span 
class="hljs-attribute">query</span> getRepo {
+    <span class="hljs-section">owner</span> {
+        <span class="hljs-attribute">name</span>
+    }
+    repo {
+        <span class="hljs-attribute">created</span>
+    }
+}
+</code></pre>
+<ul>
+<li>The <code>graphql_operation</code> is <code>query</code></li>
+<li>The <code>graphql_name</code> is <code>getRepo</code>,</li>
+<li>The <code>graphql_root_fields</code> is <code>[&quot;owner&quot;, 
&quot;repo&quot;]</code></li>
+</ul>
+<p>We can filter such route out with:</p>
+<pre><code class="hljs css language-shell"><span 
class="hljs-meta">$</span><span class="bash"> curl 
http://127.0.0.1:9080/apisix/admin/routes/1 -H <span 
class="hljs-string">'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1'</span> -X PUT 
-i -d <span class="hljs-string">'</span></span>
+{
+    "methods": ["POST"],
+    "uri": "/_graphql",
+    "vars": [
+        ["graphql_operation", "==", "query"],
+        ["graphql_name", "==", "getRepo"],
+        ["graphql_root_fields", "has", "owner"]
+    ],
+    "upstream": {
+        "type": "roundrobin",
+        "nodes": {
+            "39.97.63.215:80": 1
+        }
+    }
+}'
+</code></pre>
+<p>To prevent spending too much time reading invalid graphql request body, we 
only read the first 1 MiB
+data from the request body. This limitation is configured via:</p>
+<pre><code class="hljs css language-yaml"><span 
class="hljs-attr">graphql:</span>
+  <span class="hljs-attr">max_size:</span> <span 
class="hljs-number">1048576</span>
+
+</code></pre>
+<p>If you need to pass a graphql body which is larger than the limitation, you 
can increase the value in <code>conf/config.yaml</code>.</p>
 </span></div></article></div><div class="docs-prevnext"></div></div></div><nav 
class="onPageNav"></nav></div><footer class="nav-footer" id="footer"><section 
class="sitemap"><a href="/" class="nav-home"></a><div><h5>ASF</h5><a 
href="https://www.apache.org/";>Foundation</a><a 
href="https://www.apache.org/licenses/";>License</a><a 
href="http://www.apache.org/events/current-event/";>Events</a><a 
href="https://www.apache.org/security/";>Security</a><a 
href="https://www.apache.org/foundation/spons [...]
                 document.addEventListener('keyup', function(e) {
                   if (e.target !== document.body) {

Reply via email to