Strapi I Barely Knew Ye

Strapi, I barely knew ye.

Rian Schmidt

February 07, 2023

I've mentioned that I'm not a huge fan of Strapi anymore.

This blog article sort of summarizes why:

Note on GraphQL: Fundamentally, we used a more programmatic way to handle GraphQL. And the controllers are no longer coupled with the GraphQL resolvers.

Also, due to our new "populate" feature, you can now designate what data you would like to get from your REST API to prevent over-fetching.

Due to these two things and more flexible REST API implementation, you may have to revisit if GraphQL is still a requirement.

If GraphQL is still something you would like to use from your previous version, you would have to rewrite any of your custom resolvers with the required logic.

You may have to revisit if GraphQL is still a requirement? Seriously? Because... you're not into it anymore? Cool, cool. I'll just rip it out of all the projects I built. You're good with me using React? Or nah?

Well, as it happens, I did a whole upgrade from v3 to v4 for a client a couple of weekends ago, and it was not what I'd call super fun. It worked, but I burned several hours of my life that I'll never get back, and all I got was this stupid feature parity.

Now, one of the great things about open source is that it's (often) free, as in beer. So, complaining about how the people who make it, make it... is sort of dumb. I realize that's what I'm doing. The Strapi people think GraphQL is either a) worse than REST, or b) should look like this:

{
  repositories {
    data {
      id
      attributes {
        name
        issues {
          data {
            attributes {
              author {
                data {
                  attributes {
                    login
                    ... on Organization {
                      data 
                        id
                        attributes {
                          name
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }

    meta {
        pagination {
          pageCount
        }
    }
  }
}

So, as I think about it, I am inclined to just dump it rather than go through that time suck experience again. It may be time to get back together one of my other favorite magical tools: Hasura! If you haven't played with it, it's really something. Super fast GraphQL for (almost) free on top of a relational database. Given that all I'm doing with Strapi is this blog, I can pretty easily move the content over.

Ironically, I believe it'll be less work/frustration to move to an entirely different project than to try to untangle that v3-v4 migration mess.

Turns out the thing I need to reconsider isn't GraphQL at all.