|
|
@@ -36,33 +36,32 @@ |
|
|
|
class="demo-logo" |
|
|
|
/> |
|
|
|
<h1>Graphql</h1> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<p>Open-Source</p> |
|
|
|
<p>Released 2015 from Facebook</p> |
|
|
|
</section> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h1>Rest vs. Graphql</h1> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<section> |
|
|
|
<h2>Pizza service</h2> |
|
|
|
<h1>Whats Graphql?</h1> |
|
|
|
<p>and how it differs from REST?</p> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h2>🍕 Pizza service</h2> |
|
|
|
</section> |
|
|
|
<section class="scrollable-slide"> |
|
|
|
<img |
|
|
|
src="/assets/restful-architecture.png" |
|
|
|
alt="rest-architecture" |
|
|
|
style="background: transparent;" |
|
|
|
class="demo-logo" |
|
|
|
style="background: transparent" |
|
|
|
class="demo-logo fit-picture" |
|
|
|
/> |
|
|
|
</section> |
|
|
|
<section class="scrollable-slide"> |
|
|
|
<img |
|
|
|
src="/assets/graphql-architecture.png" |
|
|
|
alt="graphql-architecture" |
|
|
|
style="background: transparent;" |
|
|
|
class="demo-logo" |
|
|
|
style="background: transparent" |
|
|
|
class="demo-logo fit-picture" |
|
|
|
/> |
|
|
|
</section> |
|
|
|
<section> |
|
|
@@ -70,8 +69,8 @@ |
|
|
|
<img |
|
|
|
src="/assets/pizza-rest.png" |
|
|
|
alt="rest graph" |
|
|
|
style="background: transparent;" |
|
|
|
class="demo-logo" |
|
|
|
style="background: transparent" |
|
|
|
class="demo-logo fit-picture" |
|
|
|
/> |
|
|
|
</section> |
|
|
|
<section> |
|
|
@@ -79,103 +78,26 @@ |
|
|
|
<img |
|
|
|
src="/assets/pizza-graphql.png" |
|
|
|
alt="Graphql graph" |
|
|
|
style="background: transparent;" |
|
|
|
class="demo-logo" |
|
|
|
style="background: transparent" |
|
|
|
class="demo-logo fit-picture" |
|
|
|
/> |
|
|
|
</section> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<section> |
|
|
|
<h1>benefits</h1> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h2>No more Over- and Underfetching</h2> |
|
|
|
fixed data structures provide to much or not enough data |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h2>Type/Schema System</h2> |
|
|
|
<ul> |
|
|
|
<li>Graphql uses an strict Type and Schema</li> |
|
|
|
<li>The Client can be sure about what it get</li> |
|
|
|
<li>aswell as the server</li> |
|
|
|
</ul> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h2>Growing Community and Integrations</h2> |
|
|
|
<ul> |
|
|
|
<li> |
|
|
|
Good Client side Integrations Angular/React/VueJs and more. |
|
|
|
</li> |
|
|
|
<li>Server side Integrations in Typescript/Java and more.</li> |
|
|
|
<li>Well working code-generator for client and server</li> |
|
|
|
<li>Alot of well writen Documentation</li> |
|
|
|
</ul> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h2>Self Documenting</h2> |
|
|
|
<img |
|
|
|
src="/assets/self-doku.png" |
|
|
|
alt="self-doku example" |
|
|
|
style="background: transparent;" |
|
|
|
class="demo-logo" |
|
|
|
/> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h2>Faster API Development</h2> |
|
|
|
</section> |
|
|
|
<section class="scrollable-slide"> |
|
|
|
<h2>pros/cons</h2> |
|
|
|
<a |
|
|
|
style="font-size: 14px;" |
|
|
|
href="https://www.altexsoft.com/blog/engineering/graphql-core-features-architecture-pros-and-cons/" |
|
|
|
> |
|
|
|
<img |
|
|
|
src="/assets/pros-cons.png" |
|
|
|
alt="pros-cons" |
|
|
|
style="background: transparent;" |
|
|
|
class="demo-logo" |
|
|
|
/> |
|
|
|
</a> |
|
|
|
</section> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<section> |
|
|
|
<h1>disadvantages</h1> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h3>more complex</h3> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h3>no file uploading</h3> |
|
|
|
</section> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<section> |
|
|
|
<h1>Basics</h1> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<ul> |
|
|
|
<li> |
|
|
|
Types |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
Querys |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
Mutations |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
Subscriptions |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
Variables |
|
|
|
</li> |
|
|
|
<li>Types</li> |
|
|
|
<li>Querys</li> |
|
|
|
<li>Mutations</li> |
|
|
|
<li>Subscriptions</li> |
|
|
|
<li>Variables</li> |
|
|
|
</ul> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h2>Types</h2> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<pre><code data-trim data-noescape> |
|
|
|
type Pizza { |
|
|
|
id: ID! |
|
|
@@ -192,9 +114,7 @@ |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h2>Querys</h2> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h3>Define Querys</h3> |
|
|
|
<h4>Define Querys</h4> |
|
|
|
<pre> |
|
|
|
<code data-trim data-noescape> |
|
|
|
type Query { |
|
|
@@ -209,7 +129,7 @@ |
|
|
|
</pre> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h3>Simple Query</h3> |
|
|
|
<h2>Querys</h2> |
|
|
|
<pre><code data-trim data-noescape> |
|
|
|
{ |
|
|
|
listPizza { |
|
|
@@ -221,7 +141,7 @@ |
|
|
|
</pre> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h3>More Complex Query</h3> |
|
|
|
<h2>Querys</h2> |
|
|
|
<pre> |
|
|
|
<code data-trim data-noescape> |
|
|
|
{ |
|
|
@@ -237,12 +157,9 @@ |
|
|
|
</code> |
|
|
|
</pre> |
|
|
|
</section> |
|
|
|
|
|
|
|
<section> |
|
|
|
<h2>Mutations</h2> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h3>Define Mutations</h3> |
|
|
|
<h4>Define Mutations</h4> |
|
|
|
<pre><code data-trim data-noescape> |
|
|
|
type Mutation { |
|
|
|
createPizza(createPizzaDto: ChangePizzaDto): Pizza! |
|
|
@@ -254,7 +171,7 @@ |
|
|
|
</pre> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h3>Mutation</h3> |
|
|
|
<h2>Mutations</h2> |
|
|
|
<pre> |
|
|
|
<code data-trim data-noescape> |
|
|
|
mutation { |
|
|
@@ -273,12 +190,9 @@ |
|
|
|
</code> |
|
|
|
</pre> |
|
|
|
</section> |
|
|
|
|
|
|
|
<section> |
|
|
|
<h2>Subscriptions</h2> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h3>Define Subscription</h3> |
|
|
|
<h4>Define Subscription</h4> |
|
|
|
<pre> |
|
|
|
<code data-trim data-noescape> |
|
|
|
type Subscription { |
|
|
@@ -289,7 +203,7 @@ |
|
|
|
</pre> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h3>Subscription</h3> |
|
|
|
<h2>Subscriptions</h2> |
|
|
|
<pre> |
|
|
|
<code data-trim data-noescape> |
|
|
|
subscription PizzaChanged { |
|
|
@@ -302,24 +216,82 @@ |
|
|
|
</pre> |
|
|
|
</section> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<section> |
|
|
|
<h1>benefits</h1> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h2>No more Over- and Underfetching</h2> |
|
|
|
fixed data structures provide to much or not enough data |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h2>Type/Schema System</h2> |
|
|
|
<ul> |
|
|
|
<li>Graphql uses an strict Type and Schema</li> |
|
|
|
<li>The Client can be sure about what it get</li> |
|
|
|
<li>aswell as the server</li> |
|
|
|
</ul> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h2>Growing Community and Integrations</h2> |
|
|
|
<ul> |
|
|
|
<li> |
|
|
|
Good Client side Integrations Angular/React/VueJs and more. |
|
|
|
</li> |
|
|
|
<li>Server side Integrations in Typescript/Java and more.</li> |
|
|
|
<li>Well working code-generator for client and server</li> |
|
|
|
<li>Alot of well writen Documentation</li> |
|
|
|
</ul> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h2>Self Documenting</h2> |
|
|
|
<img |
|
|
|
src="/assets/self-doku.png" |
|
|
|
alt="self-doku example" |
|
|
|
style="background: transparent" |
|
|
|
class="demo-logo fit-picture" |
|
|
|
/> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h2>Faster API Development</h2> |
|
|
|
</section> |
|
|
|
<section class="scrollable-slide"> |
|
|
|
<h2>pros/cons</h2> |
|
|
|
<a |
|
|
|
style="font-size: 14px" |
|
|
|
href="https://www.altexsoft.com/blog/engineering/graphql-core-features-architecture-pros-and-cons/" |
|
|
|
> |
|
|
|
<img |
|
|
|
src="/assets/pros-cons.png" |
|
|
|
alt="pros-cons" |
|
|
|
style="background: transparent" |
|
|
|
class="demo-logo fit-picture" |
|
|
|
/> |
|
|
|
</a> |
|
|
|
</section> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<section> |
|
|
|
<h1>Live Demo</h1> |
|
|
|
<img |
|
|
|
src="/assets/pv.gif" |
|
|
|
alt="look at this graphh meme" |
|
|
|
style="background: transparent" |
|
|
|
class="demo-logo" |
|
|
|
/> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<img |
|
|
|
src="/assets/apollo-logo.png" |
|
|
|
alt="apollo logo" |
|
|
|
style="background: transparent;" |
|
|
|
style="background: transparent" |
|
|
|
class="demo-logo" |
|
|
|
/> |
|
|
|
<p>graphql-codegen</p> |
|
|
|
<p>apollo-angular</p> |
|
|
|
</section> |
|
|
|
<section> |
|
|
|
<h2> |
|
|
|
Requirements |
|
|
|
</h2> |
|
|
|
<h2>Requirements</h2> |
|
|
|
<ul> |
|
|
|
<li>npm</li> |
|
|
|
<li>nodejs</li> |
|
|
@@ -426,7 +398,6 @@ |
|
|
|
move the graphql.module.ts in src/ |
|
|
|
</pre> |
|
|
|
</section> |
|
|
|
|
|
|
|
</section> |
|
|
|
</div> |
|
|
|
</div> |