You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

308 lines
8.6KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta
  6. name="viewport"
  7. content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
  8. />
  9. <title>Graphql</title>
  10. <link rel="stylesheet" href="dist/reset.css" />
  11. <link rel="stylesheet" href="dist/reveal.css" />
  12. <link rel="stylesheet" href="dist/theme/black.css" id="theme" />
  13. <!-- Theme used for syntax highlighted code -->
  14. <link
  15. rel="stylesheet"
  16. href="plugin/highlight/monokai.css"
  17. id="highlight-theme"
  18. />
  19. </head>
  20. <body>
  21. <div class="reveal">
  22. <div class="slides">
  23. <section>
  24. <section>
  25. <img
  26. src="/assets/graphql.png"
  27. alt="graphql logo"
  28. style="
  29. height: 180px;
  30. margin: 0 auto 4rem auto;
  31. background: transparent;
  32. "
  33. class="demo-logo"
  34. />
  35. <h1>Graphql</h1>
  36. </section>
  37. <section>
  38. <p>Open-Source</p>
  39. <p>Released 2015 from Facebook</p>
  40. </section>
  41. </section>
  42. <section>
  43. <h1>Rest vs. Graphql</h1>
  44. </section>
  45. <section>
  46. <section>
  47. <h2>Pizza service</h2>
  48. </section>
  49. <section class="scrollable-slide">
  50. <img
  51. src="/assets/restful-architecture.png"
  52. alt="rest-architecture"
  53. style="background: transparent;"
  54. class="demo-logo"
  55. />
  56. </section>
  57. <section class="scrollable-slide">
  58. <img
  59. src="/assets/graphql-architecture.png"
  60. alt="graphql-architecture"
  61. style="background: transparent;"
  62. class="demo-logo"
  63. />
  64. </section>
  65. <section>
  66. <h3>Rest Service</h3>
  67. <img
  68. src="/assets/pizza-rest.png"
  69. alt="rest graph"
  70. style="background: transparent;"
  71. class="demo-logo"
  72. />
  73. </section>
  74. <section>
  75. <h3>Graphql Service</h3>
  76. <img
  77. src="/assets/pizza-graphql.png"
  78. alt="Graphql graph"
  79. style="background: transparent;"
  80. class="demo-logo"
  81. />
  82. </section>
  83. </section>
  84. <section>
  85. <section>
  86. <h1>benefits</h1>
  87. </section>
  88. <section>
  89. <h2>No more Over- and Underfetching</h2>
  90. fixed data structures provide to much or not enough data
  91. </section>
  92. <section>
  93. <h2>Type/Schema System</h2>
  94. <ul>
  95. <li>Graphql uses an strict Type and Schema</li>
  96. <li>The Client can be sure about what it get</li>
  97. <li>aswell as the server</li>
  98. </ul>
  99. </section>
  100. <section>
  101. <h2>Growing Community and Integrations</h2>
  102. <ul>
  103. <li>
  104. Good Client side Integrations Angular/React/VueJs and more.
  105. </li>
  106. <li>Server side Integrations in Typescript/Java and more.</li>
  107. <li>Well working code-generator for client and server</li>
  108. <li>Alot of well writen Documentation</li>
  109. </ul>
  110. </section>
  111. <section>
  112. <h2>Self Documenting</h2>
  113. <img
  114. src="/assets/self-doku.png"
  115. alt="self-doku example"
  116. style="background: transparent;"
  117. class="demo-logo"
  118. />
  119. </section>
  120. <section>
  121. <h2>Faster API Development</h2>
  122. </section>
  123. <section class="scrollable-slide">
  124. <h2>pros/cons</h2>
  125. <a
  126. style="font-size: 14px;"
  127. href="https://www.altexsoft.com/blog/engineering/graphql-core-features-architecture-pros-and-cons/"
  128. >
  129. <img
  130. src="/assets/pros-cons.png"
  131. alt="pros-cons"
  132. style="background: transparent;"
  133. class="demo-logo"
  134. />
  135. </a>
  136. </section>
  137. </section>
  138. <section>
  139. <section>
  140. <h1>disadvantages</h1>
  141. </section>
  142. <section>
  143. <h3>more complex</h3>
  144. </section>
  145. <section>
  146. <h3>no file uploading</h3>
  147. </section>
  148. </section>
  149. <section>
  150. <section>
  151. <h1>Demo</h1>
  152. </section>
  153. <section>
  154. <h2>Basics</h2>
  155. </section>
  156. <section>
  157. <ul>
  158. <li>
  159. Types
  160. </li>
  161. <li>
  162. Querys
  163. </li>
  164. <li>
  165. Mutations
  166. </li>
  167. <li>
  168. Variables
  169. </li>
  170. </ul>
  171. </section>
  172. <section>
  173. <h2>Types</h2>
  174. </section>
  175. <section>
  176. <pre><code data-trim data-noescape>
  177. type Pizza {
  178. id: ID!
  179. name: String!
  180. toppings: [Topping!]!
  181. }
  182. type Topping {
  183. id: ID!
  184. name: String!
  185. }
  186. </code>
  187. </pre>
  188. </section>
  189. <section>
  190. <h2>Querys</h2>
  191. </section>
  192. <section>
  193. <h3>Define Querys</h3>
  194. <pre>
  195. <code data-trim data-noescape>
  196. type Query {
  197. getPizzaById(pizzaId: ID!): Pizza!
  198. getToppingById(toppingId: ID!): Topping!
  199. getPizzaByName(pizzaName: ID!): Pizza!
  200. getToppingByName(toppingName: ID!): Topping!
  201. listPizza: [Pizza]!
  202. listTopping: [Topping]!
  203. }
  204. </code>
  205. </pre>
  206. </section>
  207. <section>
  208. <h3>Simple Query</h3>
  209. <pre><code data-trim data-noescape>
  210. {
  211. listPizza {
  212. id
  213. name
  214. }
  215. }
  216. </code>
  217. </pre>
  218. </section>
  219. <section>
  220. <h3>More Complex Query</h3>
  221. <pre>
  222. <code data-trim data-noescape>
  223. {
  224. getPizzaById(pizzaId: "0") {
  225. id
  226. name
  227. toppings {
  228. name
  229. }
  230. }
  231. }
  232. </code>
  233. </pre>
  234. </section>
  235. <section>
  236. <h2>Mutations</h2>
  237. </section>
  238. <section>
  239. <h3>Define Mutations</h3>
  240. <pre><code data-trim data-noescape>
  241. type Mutation {
  242. createPizza(createPizzaDto: ChangePizzaDto): Pizza!
  243. updatePizza(pizzaId: ID!, updatedPizzaDto: ChangePizzaDto!): Pizza!
  244. createTopping(createToppingDto: ChangeToppingDto): Topping!
  245. updateTopping(toppingId: ID!, updatedToppingDto: ChangeToppingDto!): Topping!
  246. }
  247. </code>
  248. </pre>
  249. </section>
  250. <section>
  251. <h3>Mutation</h3>
  252. <pre><code data-trim data-noescape>
  253. mutation {
  254. createPizza (createPizzaDto: {
  255. name: "My Awesome Pizza"
  256. toppingIds: "1"
  257. }) {
  258. id
  259. name
  260. toppings {
  261. id
  262. name
  263. }
  264. }
  265. }
  266. </code>
  267. </pre>
  268. </section>
  269. </section>
  270. <section>
  271. <section>
  272. <img
  273. src="/assets/apollo-logo.png"
  274. alt="apollo logo"
  275. style="background: transparent;"
  276. class="demo-logo"
  277. />
  278. <p>graphql-codegen</p>
  279. <p>apollo-angular</p>
  280. </section>
  281. </section>
  282. </div>
  283. </div>
  284. <script src="dist/reveal.js"></script>
  285. <script src="plugin/notes/notes.js"></script>
  286. <script src="plugin/markdown/markdown.js"></script>
  287. <script src="plugin/highlight/highlight.js"></script>
  288. <script>
  289. // More info about initialization & config:
  290. // - https://revealjs.com/initialization/
  291. // - https://revealjs.com/config/
  292. Reveal.initialize({
  293. hash: true,
  294. // Learn about plugins: https://revealjs.com/plugins/
  295. plugins: [RevealMarkdown, RevealHighlight, RevealNotes],
  296. });
  297. </script>
  298. </body>
  299. </html>