Talk Commerce Talk Commerce
TalkCommerce GraphQL Interview
| 7 min read

Interview with Rebecca Hauck from BigCommerce on GraphQL

By Brent W. Peterson


I recently sat down with Rebecca to talk about GraphQL and why it is a better choice in many cases over REST. Rebecca has a rich history with APIs and has dove into GraphQL passionately.

Some highlights from the article.

How much coverage is there with BigCommerce and GraphQL

Rebecca: Storefront graph QL API has been out there and in use for a couple of years.  I can confidently say that our current checkout API will be coming in q1. That is, that’s for sure. Because we want to enable headless development. So with that, they’ll have, to be able to do the full purchase funnel.

Rebecca: And going forward in 2023, we will invest more in our admin APIs and start rolling out some GraphQL APIs for that.

What are the benefits to our developers for adopting GraphQL?

Rebecca: One of the biggest value props of GraphQL is that it can be consolidated. You get much more precision with your API queries, and this is great for the front end because the front for front-end developers, want to fetch very specific data that is contextual to the view of that user.

Rebecca: So in the old world with a Rest API, you would have to fetch the whole list of products. And then, the front-end code would have to parse through this whole list of things just to display the pieces that it needs for the UI. So it’s the thing that, that’s called over fetching.

Rebecca: So you’re fetching way more data than you need and then having to write more code to parse out what you need to lay it out in the UI. With GraphQL, you can query specifically what you need for that context and not over-fetch. And that’s a huge win. It’s a win in performance because the payload sizes are smaller.

Rebecca: It’s a win on your rate limiting as well. A lot of times with the REST API. You create a query that needs the following:

I need this customer, that product, this variant, and which might actually be three separate rest API calls.

Will you be my BFF?

Rebecca: You can combine all of those under the covers. In the background, we’re still calling those same original places that stored the data, but it’s an abstraction layer, and a term that’s used a lot in the GraphQL world is BFF backend for the front end. It represents a backend that serves just the front end, that the back, the front end doesn’t need to know about a lot of the details that the backend does.

Rebecca: So the GraphQL is a mock backend, that’s a nicer interface for front-end developers to do these very specific, precise queries to get just the data they need to render their pages. 

Are all the APIs available as rest, as well as GraphQL? 

Rebecca: The way that people would achieve their storefront render they used REST. We pretty much replaced that for front-end developers with that one tiny missing piece of cart and checkout.

Rebecca: We’re hoping for more adoption of the GraphQL API once the cart and checkout are completed. I could easily see someone holding back and not having this hybrid blended world waiting until that’s complete. And certainly, our headless developers will get more adoption once we start growing in that area. [Full GraphQL Coverage]

REST is CRUD

Rebecca: Another reason why GraphQL is more popular REST APIs. REST API’s basically map to CRUD functions. Your regular database Create, Read, Update and Delete. That’s a very common pattern in rest APIs it’s just an interface for operations to get to the database.

Rebecca: Therefore the rest APIs look a lot like machine language because it’s a machine asking another machine for some data, and you get the blob back, and then somebody has to write some code, to make some sense out of it to use in an application.

Rebecca: GraphQL queries read a lot more like natural human language. This is why I like it working with PMs and less technical business people. I can put a GraphQL schema in front of them, and most, not even semi-light technical people can understand roughly what it is. With REST, you wouldn’t be able to do that in it.

Rebecca: So it’s bringing a common language across business people and technical people. And there’s a term in domain-driven design called ubiquitous language, which is saying, let’s try to use words to describe what we’re doing in all contexts to the extent that we can.

Rebecca: If you’ve ever looked at APIs, a lot of times those are not words that humans ever speak. We don’t speak that way because that is what machines do. So developers understand that language, but business people, their eyes glaze over if they look at APIs, because you have to have a translator in your head.

Rebecca: I find GraphQL has a lot more access to the masses like PMs. I’m starting to encourage my PMs here to write their own schema. Instead of writing an English language description, why don’t you try spec’ing out a schema? Its data. It’s pretty straightforward. So it’s great for that because it’s less scary of an API, less technical looking.

Rebecca: It’s also not exactly like a query, like SQL query language or similar. It doesn’t have that strict syntax as you have in SQL. Where you have your certain keywords and joins. It’s pretty free-form. I’m a huge cheerleader for GraphQL, and I’m excited about BigCommerce branching out even more than our admin APIs.

What did you do before BigCommerce?

Brent talks about his experience with Magento and Rebecca talks about her experience with Adobe.

Rebecca: I was with Adobe for 15 years. I was a PM on their API platform there. And I left in 2020. And I hadn’t really had much exposure to Magento because when we acquired big companies, it would take sometimes a couple of years before they fully matriculated into our cloud tech stack.

Rebecca: So Magento was a much more complex system to integrate into our existing cloud framework. They hadn’t actually come to Adobe IO to get on the API platform. Since I left, I’ve seen some of their architectural diagrams. So I actually see how they plugged their GraphQL.

Where can people learn more about GraphQL?

Rebecca: I find Apollo Material helpful. Their SEO is really good. So if you start Googling stuff, you’re gonna see a lot of Apollo content. It’s very good content.

Rebecca: If you ever gravitate toward their pages There are a lot of video talks. It’s generic, It’s not about e-commerce, but if you just wanna learn more about GraphQL, I’ve been immersed in those communities these last six months.