{"id":1410,"date":"2019-08-02T20:28:11","date_gmt":"2019-08-02T20:28:11","guid":{"rendered":"https:\/\/2019.omaha.wordcamp.org\/?post_type=wcb_session&#038;p=1410"},"modified":"2019-08-13T20:49:25","modified_gmt":"2019-08-13T20:49:25","slug":"play-to-your-strengths-using-graphql-with-a-wordpress-backend","status":"publish","type":"wcb_session","link":"https:\/\/omaha.wordcamp.org\/2019\/session\/play-to-your-strengths-using-graphql-with-a-wordpress-backend\/","title":{"rendered":"Play to your strengths; using GraphQL with a WordPress backend"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">WordPress is amazing, but sometimes the client just needs a custom site built. If you&#8217;re a javascript developer, you&#8217;d love to be able to reach for ${JS_FRAMEWORK} to build out the site, but don&#8217;t want to write PHP code or deal with having to write a custom backend data management either.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The best solution may be to split the front end from the back end, entirely. WordPress has a fantastic admin dashboard and the UX for adding and updating content is very simple for non-techies to grasp. How about we let the end users continue to use the WordPress dashboard to edit content, and we&#8217;ll build a snazzy the front end using javascript. The lone problem then becomes &#8216;how do we get the data?&#8217;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The WP JSON API is nifty and could work for smaller projects, but eventually all of those network requests get a little overwhelming. Enter GraphQL. GraphQL is a query language spec developed by Facebook (don&#8217;t hold that against them&#8230;) that allows you to request what you need for each request. It cuts down on HTTP traffic and makes the dev experience a heckuva lot nicer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this talk, we&#8217;ll do a crash course on GraphQL and the ecosystem that&#8217;s been built around it, making use of the WP GraphQL plugin, and building out a front end using Stencil JS, a web component compiler* (*=BONUS DEV CONTENT!)<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress is amazing, but sometimes the client just needs a custom site built. If you&#8217;re a javascript developer, you&#8217;d love to be able to reach for ${JS_FRAMEWORK} to build out the site, but don&#8217;t want to write PHP code or &hellip; <a href=\"https:\/\/omaha.wordcamp.org\/2019\/session\/play-to-your-strengths-using-graphql-with-a-wordpress-backend\/\">Continue reading <span class=\"assistive-text\">Play to your strengths; using GraphQL with a WordPress backend<\/span>  <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":16308622,"featured_media":0,"template":"","meta":{"_crdt_document":"","jetpack_post_was_ever_published":false,"_wcpt_session_time":1566658800,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_session_slides":"","_wcpt_session_video":"","_wcpt_speaker_id":[1391],"footnotes":""},"session_track":[5041],"session_category":[],"class_list":["post-1410","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-developer"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paIveg-mK","session_date_time":{"date":"August 24, 2019","time":"3:00 pm"},"session_speakers":[{"id":"1391","slug":"brock-ellis","name":"Brock Ellis","link":"https:\/\/omaha.wordcamp.org\/2019\/speaker\/brock-ellis\/"}],"session_cats_rendered":null,"_links":{"self":[{"href":"https:\/\/omaha.wordcamp.org\/2019\/wp-json\/wp\/v2\/sessions\/1410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/omaha.wordcamp.org\/2019\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/omaha.wordcamp.org\/2019\/wp-json\/wp\/v2\/types\/wcb_session"}],"version-history":[{"count":2,"href":"https:\/\/omaha.wordcamp.org\/2019\/wp-json\/wp\/v2\/sessions\/1410\/revisions"}],"predecessor-version":[{"id":1516,"href":"https:\/\/omaha.wordcamp.org\/2019\/wp-json\/wp\/v2\/sessions\/1410\/revisions\/1516"}],"speakers":[{"embeddable":true,"href":"https:\/\/omaha.wordcamp.org\/2019\/wp-json\/wp\/v2\/speakers\/1391"}],"author":[{"embeddable":true,"href":"https:\/\/omaha.wordcamp.org\/2019\/wp-json\/wporg\/v1\/users\/thebrockellis"}],"wp:attachment":[{"href":"https:\/\/omaha.wordcamp.org\/2019\/wp-json\/wp\/v2\/media?parent=1410"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/omaha.wordcamp.org\/2019\/wp-json\/wp\/v2\/session_track?post=1410"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/omaha.wordcamp.org\/2019\/wp-json\/wp\/v2\/session_category?post=1410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}