GraphQL – Deep Dive

GraphQL is a declarative data fetching spec that is invented by Facebook and open sourced in 2015. GraphQL uses a special language called query language which looks a lot like JSON objects. GraphQL is an alternative to REST API’s and have following benefits:

  • GraphQL query string is sent to GraphQL server and instead of getting full response from server you only get the data that is needed by you.
  • Query is nested and data is requested at once on single endpoint while in REST there are multiple requests on different endpoints.
  • Backward compatible (new fields can be added without breaking anything and old fields can continue to function)
  • Can wrap around existing API

Learning NGINX

Install NGINX

sudo su -
apt update
apt upgrade
apt install nginx
nginx -v

Confirm NGINX is working by navigation to localhost

NGINX Files and Directories

  • /etc/nginx (Configurations)
  • var/log/nginx (Access and error logs)
  • var/www/html (Default directory)

Commonly Used Commands

systemctl status nginx # check status
systemctl start nginx # start server
systemctl stop nginx # stop server
systemctl is-active nginx
systemctl reload nginx
nginx -h # help
nginx -t # test config without reboot
nginx -T # test config and cat file on screen

Main configuration file of nginx is located in /etc/nginx/nginx.conf (review this) but we will keep our configuration in /etc/nginx/conf.d

Unlink default unlink /etc/nginx/sites-enabled/default


WordPress VIP Go Local Setup

In this post you’ll learn how to setup your local WordPress installation which exactly replicates your preview and production website on VIP Go hosting.


How to install Compass Gem on MacOS?

Compass is a sass-based stylesheet framework that streamlines the creation and maintenance of CSS. Installation of gems required ruby so if you have ruby installed then skip to Installing Compass Gem else continue reading . You can confirm whether ruby is installed or not by

ruby -v

WordPress Setup Using VVV

In this post you are going to learn how to setup WordPress on your local machine using VVV (Varying Vagrant Vagrants) which is a vagrant box that runs virtual machine on system and setup WordPress.