1 minute read

Life is like the ocean, it goes up and down.

Summary

What it means GraphQL

  • It a server-side technology.
  • It gives a declarative way of fetching and updating your data. , which is not imperative.
  • It follows client-driven architecture. (comparing to server-driven in REST)
  • In GraphQL, the server determines available resources.
  • It is strongly and static typed.
  • GraphQL API endpoints are single.
  • It is hierarchical and product-centric.

When NO GraphQL

  • Overkill for small applications.
  • It is not a good solution for simple applications as it can add complexity.

Relationship with REST

  • GraphQL is an application layer server-side technology that is used for executing queries with existing data while REST is a software architectural style that defines a set of constraints for creating Web services.
  • GraphQL can be organized in terms of a schema whereas REST can be arranged in terms of endpoints.
  • The development speed in GraphQL is fast while the development speed in REST is Slow.

Show create scripts

show create table table_name;

To show all records vertically (and more human readable)

To add a postfix \G in each query, e.g.

select * from table1 limit 1 \G;

The output will look like below, easier for developer to check and see.

–HTH–

Updated: