Introduction

GraphiCMS is a powerful package that leverages the endless possibilities of Laravel and transforms your installation into a content management system for api-first websites. You can define collections of data and GraphiCMS will automatically generate an graphQL schema for reading, updating or deleting your content.

More than that, the control panel we provide for you allows you to manage your collections easily. Imagine the possibilities. You can have a nice control panel for your blog so you can write easily, but using tools like GatsbyJS, VuePress or something similar you can have a static blog generated by reading the GraphQL schema of the CMS.

So, it is a headless CMS?

Right now, you can call it like that. The first stage of the package focuses on building a robust collection system that allows you to use the GraphQL endpoint for fetching your data.

However, you are not limited to this kind of usage. Behind the scenes, GraphiCMS works with basic Eloquent models using either PDO driver you want, though we highly recommend you to use MongoDB since it pairs perfectly with GraphQL philosophy and static generated websites.

After the first stage of the plugin is finished, we will make an extension for GraphiCMS that will allow you to use the data you define and manipulate in the control panel in your standard Laravel installation.

Built with extendability in mind

The core package is built with extendability in mind and almost all parts of the package can be changed to meet your requirements.

Without almost no configuration, you can:

  • Define a GraphQL type
  • Define a GraphiCMS collection
  • GraphiCMS creates by default a GraphQL query for reading your collection and three mutations for creating, updating or deleting items in your collection.

We provide you defaults to work with, but you can take full control of your data. You can extend any feature of the queries or mutations or you can create a fully managed type that you will have to write queries and mutations for.

If you're familiar with GraphQL spec, every query or mutation has to resolve somehow and GraphiCMS provides you default resolvers for generic collections. You can overwrite those in the code too.

But more about extendability in the dedicated section of the docs.

Getting familiar with GraphQL

Since this package utilises GraphQL concepts, you have to be familiar with the GraphQL spec.

GraphQL is a new API standard that provides a more efficient, powerful and flexible alternative to REST. It was developed and open-sourced by Facebook and is now maintained by a large community of companies and individuals from all over the world.

At its core, GraphQL enables declarative data fetching where a client can specify exactly what data it needs from an API. Instead of multiple endpoints that return fixed data structures, a GraphQL server only exposes a single endpoint and responds with precisely the data a client asked for.

We recommend you to learn more about GraphQL on the How to GraphQL website.