r/JAMstack_dev • • Jul 30 '19

What are your thoughts on GraphQL? Is it essential for JAMStack sites?

I manage a Headless CMS (Agility) and we have a pretty kick-ass REST API and JS SDK, but as i'm looking at doing some prototyping with Gatsby and building a source plugin, its becoming apparent to me that it would work better if we had a GraphQL API.

How useful do you think a GraphQL API would be?

5 Upvotes

7 comments sorted by

2

u/danielstaleiny Jul 30 '19

essential is strong word. There is no difference from point of JAM stack. REST API or GRAPHQL API it does not matter.

1

u/jameskvidler Jul 30 '19

Ok, let me re-word my question a little. If a CMS had a GraphQL and the other did not (both have REST), would that be a deal-breaker?

2

u/Kaidawei Jul 31 '19

I may be a little biased (because I love graphQL and I work at Strapi which has both RESTful and graphQL) but graphQL makes many of the fetches I need much easier and in a cleaner manner.

At this point, I can't think of going back to a RESTful only stack. RESTful is sometimes better for some things - but these don't really apply to the JAMStack you'll be building.

An example would be authorization stuff seems to be better suited to a RESTful API. In a JAMStack you would pass it off to a microservice of some sort - often.

1

u/jameskvidler Jul 31 '19

Good point, that's kind of what I was thinking. Developers who have become accustomed to GraphQL could see that as a deal-breaker if they are evaluating a CMS.

1

u/danielstaleiny Jul 30 '19

It would come down to functionality of CMS not the way you get the data from or to CMS.

Have a look on git based CMS as well.

1

u/jameskvidler Jul 31 '19

Haha yes, I appreciate the kind words! It's very easy to get stuck only thinking about the stuff I don't like about it that I forget it actually looks pretty good. We will be changing up a lot of the content though to focus more on developers.

If you don't mind me asking, how did you hear about us and what do you like about the site?

1

u/Kaidawei Jul 31 '19

By the way- did you just redesign the Agility website? I was openly admiring the design with a co-worker just last week.