15 things

(you didn't know)

you can do with

GraphQL in WordPress

Leonardo Losoviz

What (you know) you can use GraphQL for

✅ Build headless sites

✅ Render sites dynamically via CSR

1. As an API to fetch data (like the WP REST API)

What (you know) you can use GraphQL for

2. ...(that's pretty much it)

But there is a ton more that we can do with GraphQL in WordPress...

...Using A NEW PLUGIN:

Gato GraphQL

(I am the author)

Let's explore 15 things we can do WITH (Gato) GraphQL in WordPress

1. Search WP data

(eg: finding posts or users by metadata)

2. Complement WP-CLI

(eg: selecting on which resources to apply A command)

3. Send personalized emails

4. Retrieve data for blocks for both CSR and SSR

(using DRY logic!)

5. Map JavaScript components to blocks

6. Duplicate a blog post

7. Customize content for different users

8. Adapt content in bulk

(eg: replacing a string in all posts, as when migrating the site's domain)

9. Automate admin tasks

(eg: inserting a mandatory block whenever missing)

10. Add a custom CTA block before a campaign to all posts, and remove it afterwards

11. Translate a blog post

(at the block-property level!)

12. Send a notification when there's a new post, and a daily summary of activity to your email

13. Combine data from Mailchimp subscribers and website users

14. Import a post from another WordPress site

15. Distribute content to multiple downstream sites

(eg: sync data within a multisite)

graphql

IS A POWERFUL

AND versatile

TOOL FOR

INTERACTING WITH data

in wordpress

CONCLUSION

Thanks!

🙏

15 things

(you didn't know)

you can do with

GraphQL in WordPress

Leonardo Losoviz

Slides:

15 things (you didn't know) you can do with GraphQL in WordPress

By Leonardo Losoviz

15 things (you didn't know) you can do with GraphQL in WordPress

GraphQL is not only for building headless sites. You can also send emails to selected users, duplicate blog posts, and even translate the website. Let's discover (unexpected) ways that GraphQL can be used in WordPress.

  • 553