Skip to content

Commit

Permalink
Merge pull request #164 from bmeg/graphql-fix
Browse files Browse the repository at this point in the history
make graphql schema build more robust
  • Loading branch information
adamstruck authored Nov 21, 2018
2 parents 2cd80f1 + b2062dc commit 81397ec
Show file tree
Hide file tree
Showing 9 changed files with 430 additions and 23 deletions.
13 changes: 12 additions & 1 deletion docs/docs/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@
<atom:link href="https://docs.bmeg.io/grip/docs/index.xml" rel="self" type="application/rss+xml" />


<item>
<title></title>
<link>https://docs.bmeg.io/grip/docs/tutorials/pathway-commons/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>

<guid>https://docs.bmeg.io/grip/docs/tutorials/pathway-commons/</guid>
<description>Get Pathway Commons release
curl -O http://www.pathwaycommons.org/archives/PC2/v10/PathwayCommons10.All.BIOPAX.owl.gz Convert to Property Graph
grip rdf --dump --gzip pc PathwayCommons10.All.BIOPAX.owl.gz -m http://pathwaycommons.org/pc2/#=pc: -m http://www.biopax.org/release/biopax-level3.owl#=biopax: </description>
</item>

<item>
<title>Amazon Purchase Network</title>
<link>https://docs.bmeg.io/grip/docs/tutorials/amazon/</link>
Expand Down Expand Up @@ -92,7 +103,7 @@ Load built-in example graph Loading the example data and the example schema:
grip load example-graph See the example graph
grip dump example-graph --vertex --edge See the example graph schema
grip schema example-graph Example queries Get Types:
curl -X POST -H &amp;quot;Content-Type:application/graphql&amp;quot; -d &#39;{__schema{types{name}}}&#39; http://localhost:8201/graphql/example Get Info about Human object</description>
curl -X POST -H &amp;quot;Content-Type:application/graphql&amp;quot; -d &#39;{__schema{types{name}}}&#39; http://localhost:8201/graphql/example-graph Get Info about Human object</description>
</item>

<item>
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/queries/graphql/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -249,22 +249,22 @@ <h3 id="example-queries">Example queries</h3>

<p>Get Types:</p>

<pre><code>curl -X POST -H &quot;Content-Type:application/graphql&quot; -d '{__schema{types{name}}}' http://localhost:8201/graphql/example
<pre><code>curl -X POST -H &quot;Content-Type:application/graphql&quot; -d '{__schema{types{name}}}' http://localhost:8201/graphql/example-graph
</code></pre>

<p>Get Info about Human object</p>

<pre><code>curl -X POST -H &quot;Content-Type:application/graphql&quot; -d '{__type(name:&quot;Human&quot;){fields{name}}}' http://localhost:8201/graphql/example
<pre><code>curl -X POST -H &quot;Content-Type:application/graphql&quot; -d '{__type(name:&quot;Human&quot;){fields{name}}}' http://localhost:8201/graphql/example-graph
</code></pre>

<p>Get List of all Human ids</p>

<pre><code>curl -X POST -H &quot;Content-Type:application/graphql&quot; -d 'query { HumanIds }' http://localhost:8201/graphql/example
<pre><code>curl -X POST -H &quot;Content-Type:application/graphql&quot; -d 'query {Human{id}}' http://localhost:8201/graphql/example-graph
</code></pre>

<p>Get Human 1000 and list their friends</p>

<pre><code>curl -X POST -H &quot;Content-Type:application/graphql&quot; -d 'query {Human(id:&quot;1000&quot;){name,friends{name}}}' http://localhost:8201/graphql/example
<pre><code>curl -X POST -H &quot;Content-Type:application/graphql&quot; -d 'query {Human(id:&quot;1000&quot;){name,friend_to_Human{name}}}' http://localhost:8201/graphql/example-graph
</code></pre>

</div>
Expand Down
237 changes: 237 additions & 0 deletions docs/docs/tutorials/pathway-commons/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us">
<head>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">


<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">


<title> &middot; GRIP</title>



<link rel="stylesheet" href="https://docs.bmeg.io/grip/css/poole.css">
<link rel="stylesheet" href="https://docs.bmeg.io/grip/css/darcula.css">
<link rel="stylesheet" href="https://docs.bmeg.io/grip/css/syntax.css">
<link rel="stylesheet" href="https://docs.bmeg.io/grip/css/theme.css">
<link rel="stylesheet" href="https://docs.bmeg.io/grip/css/funnel.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700">


<link rel="apple-touch-icon-precomposed" sizes="144x144" href="https://docs.bmeg.io/grip/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="https://docs.bmeg.io/grip/favicon.png">

<script src="https://docs.bmeg.io/grip/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>

</head>
<body>

<div class="global-header">
<div class="global-header-container">
<div class="global-header-home">
<a href="https://docs.bmeg.io/grip"><h1>GRIP</h1></a>
</div>
<ul class="global-header-nav">
<li><a href="https://docs.bmeg.io/grip/download//">Download</a></li>
<li><a href="https://docs.bmeg.io/grip/docs/">Docs</a></li>
<li><a href="https://github.com/bmeg/grip">GitHub</a></li>
<li><a href="https://gitter.im/bmeg/grip">Chat</a></li>
</ul>
<div class="global-header-ohsucb">
<a href="https://www.ohsu.edu/compbio/"><h2>OHSU Comp Bio</h2></a>
</div>
</div>
</div>


<div class="content section group">

<div class="sidebar col span_3_of_12">
<ul class="sidebar-nav">



<li>

<a href="https://docs.bmeg.io/grip/download/"
class="sidebar-nav-item "
>Download</a></li>


<li>

<a href="https://docs.bmeg.io/grip/docs/"
class="sidebar-nav-item "
>Overview</a></li>


<li>

<span class="intermediate">Setup your Database</span></li>

<li>
<ul class="sidebar-nav sidebar-nav-nested">
<li>
<a href="https://docs.bmeg.io/grip/docs/databases/elastic/"
class="sidebar-nav-item "
>Elasticsearch</a></li>
</ul>
</li>

<li>
<ul class="sidebar-nav sidebar-nav-nested">
<li>
<a href="https://docs.bmeg.io/grip/docs/databases/kvstore/"
class="sidebar-nav-item "
>Embedded KV Store</a></li>
</ul>
</li>

<li>
<ul class="sidebar-nav sidebar-nav-nested">
<li>
<a href="https://docs.bmeg.io/grip/docs/databases/mongo/"
class="sidebar-nav-item "
>MongoDB</a></li>
</ul>
</li>

<li>
<ul class="sidebar-nav sidebar-nav-nested">
<li>
<a href="https://docs.bmeg.io/grip/docs/databases/sql/"
class="sidebar-nav-item "
>SQL</a></li>
</ul>
</li>



<li>

<span class="intermediate">Query a Graph</span></li>

<li>
<ul class="sidebar-nav sidebar-nav-nested">
<li>
<a href="https://docs.bmeg.io/grip/docs/queries/getting_started/"
class="sidebar-nav-item "
>Getting Started</a></li>
</ul>
</li>

<li>
<ul class="sidebar-nav sidebar-nav-nested">
<li>
<a href="https://docs.bmeg.io/grip/docs/queries/operations/"
class="sidebar-nav-item "
>Operations</a></li>
</ul>
</li>

<li>
<ul class="sidebar-nav sidebar-nav-nested">
<li>
<a href="https://docs.bmeg.io/grip/docs/queries/jsonpath/"
class="sidebar-nav-item "
>Referencing Fields</a></li>
</ul>
</li>

<li>
<ul class="sidebar-nav sidebar-nav-nested">
<li>
<a href="https://docs.bmeg.io/grip/docs/queries/graphql/"
class="sidebar-nav-item "
>GraphQL</a></li>
</ul>
</li>



<li>

<span class="intermediate">Tutorials</span></li>

<li>
<ul class="sidebar-nav sidebar-nav-nested">
<li>
<a href="https://docs.bmeg.io/grip/docs/tutorials/amazon/"
class="sidebar-nav-item "
>Amazon Purchase Network</a></li>
</ul>
</li>

<li>
<ul class="sidebar-nav sidebar-nav-nested">
<li>
<a href="https://docs.bmeg.io/grip/docs/tutorials/tcga-rna/"
class="sidebar-nav-item "
>TCGA RNA Expression</a></li>
</ul>
</li>



<li>

<span class="intermediate">Security</span></li>

<li>
<ul class="sidebar-nav sidebar-nav-nested">
<li>
<a href="https://docs.bmeg.io/grip/docs/security/basic/"
class="sidebar-nav-item "
>Basic Auth</a></li>
</ul>
</li>



<li>

<span class="intermediate">Developers</span></li>

<li>
<ul class="sidebar-nav sidebar-nav-nested">
<li>
<a href="https://github.com/bmeg/grip/blob/master/gripql/gripql.proto"
class="sidebar-nav-item "
>API</a></li>
</ul>
</li>

<li>
<ul class="sidebar-nav sidebar-nav-nested">
<li>
<a href="https://godoc.org/github.com/bmeg/grip"
class="sidebar-nav-item "
>GoDoc</a></li>
</ul>
</li>




</ul>
</div>

<div class="main col span_8_of_12">
<p>Get Pathway Commons release</p>

<pre><code>curl -O http://www.pathwaycommons.org/archives/PC2/v10/PathwayCommons10.All.BIOPAX.owl.gz
</code></pre>

<p>Convert to Property Graph</p>

<pre><code>grip rdf --dump --gzip pc PathwayCommons10.All.BIOPAX.owl.gz -m http://pathwaycommons.org/pc2/#=pc: -m http://www.biopax.org/release/biopax-level3.owl#=biopax:
</code></pre>

</div>

</div>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us">
<head>
<meta name="generator" content="Hugo 0.47.1" />
<meta name="generator" content="Hugo 0.51" />
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">

Expand Down
13 changes: 12 additions & 1 deletion docs/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@
<atom:link href="https://docs.bmeg.io/grip/index.xml" rel="self" type="application/rss+xml" />


<item>
<title></title>
<link>https://docs.bmeg.io/grip/docs/tutorials/pathway-commons/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>

<guid>https://docs.bmeg.io/grip/docs/tutorials/pathway-commons/</guid>
<description>Get Pathway Commons release
curl -O http://www.pathwaycommons.org/archives/PC2/v10/PathwayCommons10.All.BIOPAX.owl.gz Convert to Property Graph
grip rdf --dump --gzip pc PathwayCommons10.All.BIOPAX.owl.gz -m http://pathwaycommons.org/pc2/#=pc: -m http://www.biopax.org/release/biopax-level3.owl#=biopax: </description>
</item>

<item>
<title>Amazon Purchase Network</title>
<link>https://docs.bmeg.io/grip/docs/tutorials/amazon/</link>
Expand Down Expand Up @@ -102,7 +113,7 @@ Load built-in example graph Loading the example data and the example schema:
grip load example-graph See the example graph
grip dump example-graph --vertex --edge See the example graph schema
grip schema example-graph Example queries Get Types:
curl -X POST -H &amp;quot;Content-Type:application/graphql&amp;quot; -d &#39;{__schema{types{name}}}&#39; http://localhost:8201/graphql/example Get Info about Human object</description>
curl -X POST -H &amp;quot;Content-Type:application/graphql&amp;quot; -d &#39;{__schema{types{name}}}&#39; http://localhost:8201/graphql/example-graph Get Info about Human object</description>
</item>

<item>
Expand Down
4 changes: 4 additions & 0 deletions docs/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">

<url>
<loc>https://docs.bmeg.io/grip/docs/tutorials/pathway-commons/</loc>
</url>

<url>
<loc>https://docs.bmeg.io/grip/docs/tutorials/amazon/</loc>
</url>
Expand Down
Loading

0 comments on commit 81397ec

Please sign in to comment.