{"id":1778,"date":"2023-02-14T07:22:14","date_gmt":"2023-02-14T07:22:14","guid":{"rendered":"https:\/\/blog.amt.in\/?p=1778"},"modified":"2023-02-14T07:22:14","modified_gmt":"2023-02-14T07:22:14","slug":"insights-on-graphql","status":"publish","type":"post","link":"https:\/\/blog.amt.in\/index.php\/2023\/02\/14\/insights-on-graphql\/","title":{"rendered":"Insights on GraphQL"},"content":{"rendered":"<p>GraphQL\u00c2\u00a0is an open-source data\u00c2\u00a0query\u00c2\u00a0and\u00c2\u00a0manipulation\u00c2\u00a0language for\u00c2\u00a0APIs, and a runtime for fulfilling queries with existing data.\u00c2\u00a0GraphQL was developed internally by\u00c2\u00a0Facebook\u00c2\u00a0in 2012 before being publicly released in 2015.\u00c2\u00a0On 7 November 2018, the GraphQL project was moved from Facebook to the newly-established GraphQL Foundation, hosted by the non-profit\u00c2\u00a0Linux Foundation.\u00c2\u00a0Since 2012, GraphQL&#8217;s rise has followed the adoption timeline as set out by Lee Byron, GraphQL&#8217;s creator, with accuracy.\u00c2\u00a0Byron&#8217;s goal is to make GraphQL omnipresent across web platforms.<\/p>\n<p>The term\u00c2\u00a0Web service\u00c2\u00a0(WS) is either:<\/p>\n<ul>\n<li>a service offered by an electronic device to another electronic device, communicating with each other via the\u00c2\u00a0World Wide Web, or<\/li>\n<li>a server running on a computer device, listening for requests at a particular port over a network, serving web documents (HTML, JSON, XML, images), and creating\u00c2\u00a0web applications services, which serve in solving specific domain problems over the Web (WWW, Internet, HTTP)<\/li>\n<\/ul>\n<p>In a Web service a Web technology such as\u00c2\u00a0HTTP\u00c2\u00a0is used for transferring machine-readable file formats such as\u00c2\u00a0XML\u00c2\u00a0and\u00c2\u00a0JSON.<\/p>\n<p>In practice, a Web service commonly provides an\u00c2\u00a0object-oriented\u00c2\u00a0Web-based interface to a database server, utilized for example by another Web server, or by a\u00c2\u00a0mobile app, that provides a user interface to the end-user. Many organizations that provide data in formatted HTML pages will also provide that data on their server as XML or JSON, often through a Web service to allow\u00c2\u00a0syndication, for example, Wikipedia&#8217;s\u00c2\u00a0Export. Another application offered to the end-user may be a\u00c2\u00a0mashup, where a Web server consumes several Web services at different machines and compiles the content into one user interface.<\/p>\n<p>An\u00c2\u00a0application programming interface\u00c2\u00a0(API) is a\u00c2\u00a0computing interface\u00c2\u00a0which defines interactions between multiple software intermediaries. It defines the kinds of calls or requests that can be made, how to make them, the data formats that should be used, the conventions to follow, etc. It can also provide extension mechanisms so that users can extend existing functionality in various ways and to varying degrees.\u00c2\u00a0An API can be entirely custom, specific to a component, or it can be designed based on an industry-standard to ensure interoperability. Through\u00c2\u00a0information hiding, APIs enable\u00c2\u00a0modular programming, which allows users to use the interface independently of the implementation.<\/p>\n<p>In building applications, an API (application programming interface) simplifies programming by\u00c2\u00a0abstracting\u00c2\u00a0the underlying implementation and only exposing objects or actions the developer needs. While a graphical interface for an\u00c2\u00a0email client\u00c2\u00a0might provide a user with a button that performs all the steps for fetching and highlighting new emails, an API for file\u00c2\u00a0input\/output\u00c2\u00a0might give the developer a\u00c2\u00a0function\u00c2\u00a0that copies a file from one location to another without requiring that the developer understand the\u00c2\u00a0file system\u00c2\u00a0operations occurring behind the scenes.<\/p>\n<p>It provides an approach to developing web APIs and has been compared and contrasted with\u00c2\u00a0REST\u00c2\u00a0and other\u00c2\u00a0web service\u00c2\u00a0architectures. It allows clients to define the structure of the data required, and the same structure of the data is returned from the server, therefore preventing excessively large amounts of data from being returned, but this has implications for how effective\u00c2\u00a0web caching\u00c2\u00a0of query results can be. The flexibility and richness of the query language also adds complexity that may not be worthwhile for simple APIs.\u00c2\u00a0It consists of a type system, query language and execution semantics, static validation, and\u00c2\u00a0type introspection.<\/p>\n<p>A\u00c2\u00a0Web cache\u00c2\u00a0(or\u00c2\u00a0HTTP cache) is an information technology for the temporary storage (caching) of Web documents, such as Web pages, images, and other types of Web multimedia, to reduce server lag. A Web cache system stores copies of documents passing through it; subsequent requests may be satisfied from the cache if certain conditions are met. A Web cache system can refer either to an appliance or to a computer program.<\/p>\n<p>GraphQL supports reading, writing (mutating), and subscribing to changes to data (realtime updates \u00e2\u20ac\u201c most commonly implemented using\u00c2\u00a0WebHooks).\u00c2\u00a0GraphQL servers are available for multiple languages, including\u00c2\u00a0Haskell,\u00c2\u00a0JavaScript,\u00c2\u00a0Perl,\u00c2\u00a0Python,\u00c2\u00a0Ruby,\u00c2\u00a0Java,\u00c2\u00a0C++,\u00c2\u00a0C#,\u00c2\u00a0Scala,\u00c2\u00a0Go,\u00c2\u00a0Rust,\u00c2\u00a0Elixir,\u00c2\u00a0Erlang,\u00c2\u00a0PHP,\u00c2\u00a0R, and\u00c2\u00a0Clojure.<\/p>\n<p>The above is a brief about GraphQL. Watch this space for more updates on the latest trends in Technology.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GraphQL\u00c2\u00a0is an open-source data\u00c2\u00a0query\u00c2\u00a0and\u00c2\u00a0manipulation\u00c2\u00a0language for\u00c2\u00a0APIs,<\/p>\n","protected":false},"author":1,"featured_media":1780,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[718,719,7],"tags":[721,720,18],"class_list":["post-1778","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-graphql","category-open-source-data-query","category-techtrends","tag-graphql","tag-open-source-data-query","tag-technology"],"_links":{"self":[{"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/posts\/1778","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/comments?post=1778"}],"version-history":[{"count":1,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/posts\/1778\/revisions"}],"predecessor-version":[{"id":1779,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/posts\/1778\/revisions\/1779"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/media\/1780"}],"wp:attachment":[{"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/media?parent=1778"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/categories?post=1778"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.amt.in\/index.php\/wp-json\/wp\/v2\/tags?post=1778"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}