Yep, you read that title correctly. Even though I am myself the creator of a GraphQL server for WordPress, I've changed my mind concerning if WordPres

๐Ÿ™…โ€โ™€๏ธ Why GraphQL should not be in WordPress core

submited by
Style Pass
2021-08-10 21:30:09

Yep, you read that title correctly. Even though I am myself the creator of a GraphQL server for WordPress, I've changed my mind concerning if WordPress should ship with GraphQL or not.

Until not long ago, I believed that GraphQL should be in WordPress core. The logic was that contributors were spending time and effort on implementing functionality for the WP REST API (batch operations) which is native to GraphQL.

However, I have lately learnt some new information which made me think again, and now I believe WordPress should not ship with GraphQL, because of the added risks.

Historically, a certain functionality is added to WordPress core only if it satisfies the 80/20 rule, meaning that 80% or more of the users will use it.

Would that be the case with GraphQL? I think the answer is "no", based on the precedent from the introduction of the WP REST API to WordPress 4.7.

In his talk WordPress as Data, 5 Years In, K. Adam White (main lead of the initial development and release of the WP REST API) described that the contributors expected the REST API to be widely used once it was released with core. But that didn't happen: developers kept creating WordPress sites the same way as before, paying little attention to "headless" or the REST API.

Leave a Comment