Welcome to Press This, the WordPress community podcast from WMR. Here host David Vogelpohl sits down with guests from around the community to talk about the biggest issues facing WordPress developers. The following is a transcription of the original recording.
David Vogelpohl: Hello everyone and welcome to Press This the WordPress community podcasts on WMR. This is your host, David Vogelpohl, I support the WordPress community through my role at WP Engine, and I love to bring the best of the community to you hear every week on press this as a reminder, you can find me on Twitter @wpdavidv, or you can subscribe to press this on iTunes, iHeartRadio, Spotify, or download the latest episodes at wmr.fm. In this episode, we should have done it at like Halloween time because we’re going to talk about is the rise of headless WordPress with Jason Bahl, the creator of WP Graph QL, Jason, welcome to Press This.
Jason Bahl: Yeah, thanks for having me.
JB: Yeah, sure. So I think it was 2008 I believe I was doing a lot of flash website building, and my cousin. Want a website where he can manage the content I was like, Oh man, that’s not that easy to do with a flash site. So I was looking into various ways of hooking up some sort of CMS to a flash site and that’s when I discovered WordPress had an XML RPC, and used WordPress at the time, found out about this API that could work with flash site I ended up not building anything to connect the two, but found WordPress started playing with it and have been working full time in WordPress pretty much ever since.
DV: I feel like that’s a very apropos origin story for you, Jason. Yeah, like you’re basically trying to set up WordPress to leverage flashers the front end back in 2008. And this was pre custom post types and custom meta fields which would have been released in 2010 So you were trying to do this before. WordPress even had that kind of data organization layer, as part of core.
JB: Yeah, back then. I think the common approach was to like set up different categories to act as a custom post type essentially it’s like, if, if this post is categorized a certain way treated differently, was, was kind of approached back then. But yeah, I hadn’t even heard of WordPress back then I set it up, took me longer than the five minutes that was advertised. But, but, yeah, I fell in love with it right away I was like, I’ve never, never experienced something that felt so powerful to like give users the ability to create for the web.
DV: very apropos you’re definitely the first guest to have a headless WordPress SEO origin story. You recently joined WP Engine tell me what you do there.
JB: Yes, so I started WP Graph QL as an open source project. Back in, let’s see 2016 and been working on that largely as a side project I worked the last year and a half at Gatsby, working on it, and then come over to WP Engine my role against who’s going to transition to work on not WordPress as much. So WP Engine saw that it was a, an important project to keep pushing forward. WordPress into the modern era. And so I’m, I’m here at WP engine still working primarily on WP Graph QL and its immediate ecosystem like currently today I’m working on WP Graph QL for advanced custom fields which is an extension I maintain to bridge those two worlds together. But yes I’m mostly working on pushing forward WP Graph QL immediately ecosystem, and then working with other teams here at WP Engine that are focusing on headless WordPress and helping them. You know just navigate the waters, and make work headless WordPress experience for everybody.
DV: That’s great. You get to continue to work there for WP Graph QL I know so many people who rely on it, and I’m glad to hear about you kind of working on those extensions, particularly there with ACF. For those that are listening though that may be unfamiliar. What is headless WordPress.
JB: One thing I like to note too is it doesn’t have to be like an all in thing, right, like, you can still use parts of WordPress to render things and maybe something else to render other things like the native iOS app, like get the newspaper I worked at, where we use WordPress theming layer for the regular Word WordPress sites, but we had our iOS apps also so we had WordPress rendering for the web. We had iOS apps getting data from an API. And then we had like a separate data warehouse team that was also getting data from the API. So, and then we use the content for print, as well, so we had all these different rendering engines and WordPress itself was one of them.
DV: We need a word for this like the Hydra or something with all these heads. It’s such an interesting construct to think about because so many people have assumptions going into what to what it means and some of it seems foreign to folks and then familiar. But then if you look at kind of the base components, it’s very similar what folks have been doing for a really long time. Thank you for that overview really really helpful. Now I want to kind of dive next into like well what are some of the benefits that that headless WordPress provides but we’re gonna take a quick break and we’ll be right back.
DV: I remember that from my very first sinner days internet days back in 1996 less data was faster. Oh, I can. Okay so this is like from the high level the benefits you get benefits around performance and security and certainly how your team works on your site and the capabilities they have prototype building modifications and Tech Decks, there’s always benefits. Somebody is like interested though they’re like okay, I’m gonna give it a shot. What skills or tools do teams need to have in order to build a headless WordPress site. And for the rest of the interview Jason when I say headless WordPress she’s saying a couple jobs.
JB: Yes. Yes. So I think there’s two sides to it, right, there’s, there’s obviously the WordPress side which is a PHP based and MySQL based CMS. So if you need to expose data from the CMS, that is not already exposed by something like WP Graph QL, you would need PHP and probably MySQL skills at some level and some understanding of how WordPress works and, you know, capabilities and permissions and things like that,
JB: Yeah, I think, yeah guna Grimberg experience will help quite a bit, it’s not going to translate necessarily like perfectly, but the experience of using React and components and state management and things like that would translate pretty good.
JB: Yeah, I was in, I was in the room that day.
DV: Oh in Philly, you were so funny. Do you remember how many people was it. Were you one of the people that, that wooted when he said that?
DV: you and Zach Gordon maybe are like the only people that were like Yeah, yeah. It’s really kind of interesting. All right, cool. I actually have a ton of more questions, but we’re gonna take another quick break and we’ll be right back.
DV: Hello everyone welcome back to Press This WordPress community podcast on WMR. We’re interviewing Jason Bahl about headless WordPress, Jason right before the break, you gave us kind of a quick rundown of the tools and experience that people would need in order to start building with headless thank you for that. It’s also mentioned WP Graph QL few times maybe you haven’t given us a ton of details. So what is WP Graph QL, and why did you recently double the price.
JB: Yeah. So what is WP Graph QL. So it’s a free, open source WordPress plugin that, that turns any wordpress site into a Graph QL server. What that means is, your site will be given a Graph QL endpoint so like your site.com slash Graph QL and then request can be made to that endpoint specifying exactly what data you want out of the API. So similar to rest in that you’re, you make a request to the API and you get JSON responses with the differences you specify in order to interact with the Graph QL API, you have to specify exactly what data you want out of it with rest you say, I want to hit this endpoint and whatever the server gives me. I have to be okay with where with Graph QL you specify ahead of time, exactly what you want so you can query, you know, posts and just the title of the post, and you’ll get exactly that response, or you can even follow resources so you say I want a list of posts with their title, and I also want the author and the author’s name, and maybe I even want the author’s five most recent posts. So you can do all this in one request, and you can specify down to the field exactly what you want. Will redress doing the same thing you’d have to hit the post endpoint, give a JSON payload back which would include the author id and enough to make request back to get all the authors of all 10 posts that he just received, then you have to wait for that, and then you have to make another request to get the recent posts from each author. So it puts a lot of burden on the application developer that’s interacting with the API where Graph QL gives you a lot more freedom and control and allows a lot less data to be transferred from the server to the client. This is next gen
JB: yeah the first use case I mentioned it earlier the our first use case was syndicating content from PHP servers to other PHP servers. And part of it was the, the amount of data we were sending over the wire was painful and the amount of round trips we had to make to get all the data, like when you, when you syndicate a blog post. You’re not just syndicating the posts, you’re syndicating the author, the posts and the terms the taxonomy terms that are associated with it and the media. So there’s all sorts of network round trips, we were doing with Ras or with Graph QL we could specify exactly what we needed and make one request for it, and it would have made the developer process much easier because they were making one request and it’s very explicit so even six months down the road even if something wasn’t working. It was explicit what we needed, and then we can pinpoint that with rest It’s like something changed on any given endpoint. It’s hard to know what it was before because the coaches says hey give me this resource, And you don’t, as a developer trying to troubleshoot that you don’t know what it was yesterday versus today with Graph QL you know exactly what the consumer was asking for. So, it’s a lot easier to troubleshoot.
DV: Yeah. Gotcha. So like, you’re not like lost in the weeds with all this parsing and you’re not slamming your request server with request because you’re making more efficient requests which are easier for you as a developer to deal with. I love that rundown. You mentioned earlier that you’re working to make WP Graph QL extension for ACF better, that’s cool. Also, I was joking earlier Chris about doubling the price from $0 to $0. But you obviously have a lot going on. What are you working on a WP Engine that you’re excited about.
JB: Yeah so I mean my work is done for Graph QL and the engine are pretty much synonymous, I do collaborate with other teams that are working on the headless space so I would say don’t be Graph QL for advanced custom fields we’re doing some big changes to that I published like a preview video of a feature I’m working on just yesterday but YouTube. So that’ll be probably published to the plugin. This week it’s a big refactor of how location rules map to the schema. So ACF is a big one. I’m working like I collaborate with external teams like the team that’s working on WP Graph QL for Gravity Forms. Like I chat with them and help, help them lead the development on that plugin. One thing that’s, that’s happening is, plugins are taking ownership of the graphical interactions themselves. So, like custom post type UI popular plugin for adding custom post types. Just took ownership of the Graph QL integration I used to have an extension that bridged WP Graph QL and that plugin, They merged that into their plugin of their owning that interaction. Now, the events calendar, had a Graph QL extension and in February, they took ownership of that as well, it’s not bundled into the events calendar core but they took ownership of maintaining it and use it for you as it can.
DV: Painter to keep up with all these different integrations and plugins, it’s good to see that that’s a really positive sign for momentum in the VP graph UI view. Yeah. Anyway, getting out of their way to spend their own time to maintain it. Are there.
JB: Yeah, exactly. And then Yoast is doing the same thing now before that they’re working on right now or a branch of the Yoast WordPress SEO by Yoast, that they’re working on. Going the integration themselves as well so I think that’s one of the things that excites me the most is just how much the community is saying hey, this thing’s important. Let’s kind of rally around it, share ownership of it.
DV: Yeah, absolutely, that’s, that’s awesome news and that’s great to hear that progress and sounds like, you know, with that, with that kind of adoption. The future’s bright I’m glad you’re able to spend time working on WP Graph QL again know a lot of folks rely on that solution. Jason, thank you so much for joining us today.
JB: Yeah, absolutely.
DV: Awesome. If you’d like to learn more about what Jason is up to you can visit MVP Graph QL comm or check out the headless team he sits on a WP Engine at WP Engine comm Ford slash Atlas. Thanks everyone for listening to press this the WordPress community podcast on W Mr. Again, this has been your host, David Vogel poll, I support the WP Engine, sorry the WordPress community through my role at WP Engine and I love to bring the best of the community to you here every week.
Start the conversation