Release v3@alpha.12 — GraphQL, Rich Text Editor & Redesigned Dashboard 🎉

Strapi
Strapi
Apr 18, 2018 · 9 min read
Image for post
Image for post

🚀 GraphQL

Image for post
Image for post
Image for post
Image for post
query {  
posts {
title
content
}
}
// Post.js
module.exports = {

find: async (ctx) => {
return strapi.services.post.fetchAll(ctx.query);
},

...
}
Image for post
Image for post

Usage

strapi install graphql

Configurations

{
"endpoint": "/graphql",
"shadowCRUD": true
}

Query API

query {  
user(id: "5aafe871ad624b7380d7a224") {
username
email
}
}
query {  
users {
username
email
}
}
query {  
users(limit: 10, start: 10, sort: "username:asc", where: {
email_contains: "@strapi.io"
}) {
username
email
}
}
query {  
users(where: {
createdAt_gt: "2018-03-19 16:21:07.161Z"
}) {
username
email
}
}

Shadow CRUD

{
"connection": "default",
"options": {
"timestamps": true
},
"attributes": {
"title": {
"type": "string"
}
"content": {
"type": "text"
},
"published": {
"type": "boolean"
}
}
}
type Post {  
_id: String
created_at: String
updated_at: String
title: String
content: String
published: Boolean
}

type Query {
posts(sort: String, limit: Int, start: Int, where: JSON): [Post]
post(id: String!): Post
}

Go further

🚀 Rich Text Editor

Image for post
Image for post

🚀 New Dashboard Design

Image for post
Image for post

Improvements

Give it a try!

$ npm i strapi@alpha -g
$ strapi -v
$ strapi new my-app
$ cd my-app 
$ strapi start

What is coming next?


Strapi

Strapi is the leading open-source headless CMS.

Strapi

Written by

Strapi

The open source Headless CMS Front-End Developers love.

Strapi

Strapi

Strapi is the leading open-source headless CMS. It’s 100% Javascript, fully customizable and developer-first. Unleash your content with Strapi.

Strapi

Written by

Strapi

The open source Headless CMS Front-End Developers love.

Strapi

Strapi

Strapi is the leading open-source headless CMS. It’s 100% Javascript, fully customizable and developer-first. Unleash your content with Strapi.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store