REST vs GraphQL in Magento 2.x

  • We will see here , how differentiate REST and GraphQL request call between Client and server for fetching the data .
  • Compare to REST GraphQL is best with fetching the data and manipulating exact result.
  • Faster than REST.
  • Below sample example will provide easy understanding points between REST & GraphQL.

Task :

Need to display Username , List of twits by User & Followers as like below format (expected output )



Using GraphQL Service: