Although it can feel like a big leap at first, using custom GraphQL gives you ultimate control over dynamic data. We'll guide you through.
Firstly, let's go through a few frequently asked questions about GraphQL. In the next article, we'll then get started on our first Query on a new Starter Site.
GraphQL is an open-source querying language which was originally developed by Facebook. The general idea was to create a language which allowed Developers to quickly develop flexible requests for data, while being efficient and only asking for exactly the data they needed. You can read about the open-source project on their website here: https://graphql.org/
It's worth noting that you don't need to learn GraphQL to use our features. Most of the time, Siteglide does the querying for you. However, learning GraphQL will allow your Agency to take on more challenging projects- see the next question.
Although the language is open source, actual implementations of it can be quite different across platforms. This is because a GraphQL implementation has two parts:
If you've used GraphQL before with a different Schema, you will start to see lots of similarities.
Liquid is a templating language; GraphQL is a query language. To put it another way, think of GraphQL as a re-usable question. Liquid will both ask the question- and listen to the answer, using it to build a dynamic website. The question itself is in a different language: GraphQL.
GraphQL files are stored inside the marketplace_builder folder. They can be called by Liquid and re-used as many times as you like.
GraphQL can be tricky to get started with, but most of our Developers report that at a certain stage, it just 'clicks' for them. We want to help any Agency who wants to learn to get there.
We'll provide a series of Tutorials, starting off simple and becoming progressively more challenging. As part of this, we'll aim to give you the skills you need to carry out further learning yourself- often this will mean learning to read the platformOS schema- finding the type of query you need, and experimenting with how to make it work.
Every time we add a new GraphQL Tutorial, you'll be able to access increased support on that topic via the Forum. You can see an overview of the topics we've covered so far here
In the next Tutorial, we'll show you how to use the GraphQL sandbox to test out Queries. Let's go
We want to give you all the tools you need to learn GraphQL and we'll give our general tips, tricks and links to help you solve problems. Unfortunately, we can't build a custom Page for you or assist with custom GraphQL questions - we want to stick to providing first class support on the core product and it wouldn't be fair on other Agencies.
If you're stuck, here are some things you can try:
Writing GraphQL queries gives you ultimate control over your dynamic data. Now, for a small Site, it's probably faster to use Siteglide's pre-built features to cover this for you. Here are some examples of where some custom GraphQL could open some doors for your Agency. We'll update this list with tutorials and suggestions in the future:
Our first tutorial will get you set up on the GraphQL playground/ sandbox which we make available through Siteglide-CLI.