array:85 [
  "id" => 160
  "featured" => false
  "addImage" => true
  "overwriteMeta" => false
  "fullsize" => false
  "addEnclosure" => false
  "target" => false
  "noComments" => false
  "published" => true
  "pid" => 9
  "tstamp" => 1706532433
  "headline" => "GraphQL vs. REST: Which is Better for Interface Development?"
  "alias" => "graphql-vs-rest-which-is-better-for-interface-development"
  "author" => "by Steffi Greuel"
  "date" => "2023 Jul 18 12:08"
  "time" => 1689674880
  "pageTitle" => "GraphQL vs. REST: A Comparison"
  "robots" => ""
  "description" => "We will look at the similarities & differences between GraphQL vs. REST and address the question of which one is better for your project. ▶️ Read now!"
  "subheadline" => ""
  "teaser" => "<p><span lang="EN-US">CMS and e-commerce systems are not all-in-one solutions for web presence that can do everything. Given the increasing number of new and complex requirements, this claim would be unrealistic. Instead, these systems serve as the foundation upon which a customized website can be built. This has been achieved for some time through interfaces that allow the integration of new systems and functionalities. Representational State Transfer, or REST, has long been the dominant standard for web APIs. However, GraphQL is now emerging as its competitor. In this blog post, we will look at the similarities and differences between both principles and address the question of which one is better suited for your project.</span></p>"
  "singleSRC" => "files/content/blog/content/graphql-vs-rest-1-670x415.jpg"
  "alt" => "Person working with a laptop"
  "imageTitle" => ""
  "size" => "a:3:{i:0;s:0:"";i:1;s:0:"";i:2;s:1:"2";}"
  "imageUrl" => ""
  "caption" => ""
  "floating" => "above"
  "enclosure" => []
  "source" => "default"
  "linkText" => ""
  "jumpTo" => 0
  "articleId" => 0
  "url" => ""
  "cssClass" => ""
  "start" => ""
  "stop" => ""
  "languageMain" => 0
  "tags" => array:1 [
    0 => "E-Commerce"
  ]
  "canonicalLink" => ""
  "lesedauer" => ""
  "contaoSeoMainKeyword" => ""
  "contaoSeoSecondaryKeywords" => ""
  "searchIndexer" => ""
  "og_title" => ""
  "og_type" => ""
  "og_image" => null
  "og_properties" => null
  "twitter_site" => ""
  "twitter_creator" => ""
  "twitter_card" => ""
  "twitter_title" => ""
  "twitter_description" => null
  "twitter_image" => null
  "class" => ""
  "newsHeadline" => "GraphQL vs. REST: Which is Better for Interface Development?"
  "subHeadline" => ""
  "hasSubHeadline" => false
  "linkHeadline" => "<a href="/news/graphql-vs-rest-which-is-better-for-interface-development" title="Read the article: GraphQL vs. REST: Which is Better for Interface Development?">GraphQL vs. REST: Which is Better for Interface Development?</a>"
  "archive" => Contao\NewsArchiveModel {#1480
    #arrData: array:15 [
      "id" => 9
      "protected" => false
      "allowComments" => false
      "moderate" => false
      "bbcode" => false
      "requireLogin" => false
      "disableCaptcha" => false
      "tstamp" => 1701087847
      "title" => "Aktuelles &#40;EN&#41;"
      "jumpTo" => 98
      "groups" => null
      "notify" => "notify_admin"
      "sortOrder" => "ascending"
      "perPage" => 0
      "master" => 0
    ]
    #arrModified: []
    #arrRelations: array:3 [
      "jumpTo" => array:4 [
        "table" => "tl_page"
        "field" => "id"
        "type" => "hasOne"
        "load" => "lazy"
      ]
      "groups" => array:4 [
        "table" => "tl_member_group"
        "field" => "id"
        "type" => "hasMany"
        "load" => "lazy"
      ]
      "master" => array:3 [
        "table" => "tl_news_archive"
        "field" => "id"
        "type" => "hasOne"
      ]
    ]
    #arrRelated: []
    #arrEnums: []
    #blnPreventSaving: false
  }
  "count" => 0
  "text" => Closure() {#1485
    class: "Contao\Template"
    use: {
      $callback: """
            <div class="custom-text pb-row bg-white ce_rsce_text block">\r\n
                <div class="text-wrapper" data-widget="rsce_text_config">\r\n
                    <div class="container-xxl text-left">\r\n
                        <div class="row">\r\n
                            <div class="">\r\n
                                                            <div class="subheadline">A Brief Overview</div>\r\n
                                                                                    <h2 class="headline">GraphQL and REST</h2>\r\n
                                                                            <div class="content text-left column-1">\r\n
                                    <p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">The REST or RESTful architecture is the result of a doctoral thesis by Roy Fielding, a US computer scientist, in 2000. His REST protocol is based on six principles, with the principle of statelessness being essential for the structure of interfaces (REST APIs) programmed with REST. It states that each message must contain all the necessary information for understanding. Although REST is generally compatible with any protocol or file format, the HTTP protocol is commonly used for data transfer, usually via JSON (JavaScript Object Notation).</span></p>\n
        <p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">For more than a decade, the REST architecture remained uncontested as the standard for creating interfaces until Facebook developed the query language GraphQL in 2012. It is now open-source and has been handed over to the Linux Foundation. REST and GraphQL follow different paths for data processing. While REST transmits all information of a query, GraphQL only transfers necessary data. To achieve this, queries are matched with schemas created by developers, and so-called resolvers assign appropriate values to the queried object types.</span></p>\n
        <h2 class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Advantages of GraphQL</span></h2>\n
        <p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Targeted Data Retrieval: Only the requested data is returned, preventing the retrieval of irrelevant information (no overfetching). Reduced Room for Miscommunication: By defining object types in GraphQL queries, miscommunication between client and server can be avoided. Evolution without Versioning: An API can be enriched with new features without affecting existing queries. No Specific Application Structure: GraphQL can be installed on an existing REST API and used with classic API management tools, such as Microsoft Azure&#39;s API Management.</span></p>\n
        <h2 class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Advantages of REST</span></h2>\n
        <p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Established Approach: REST has been widely used in interface programming for over 20 years, making it a well-established approach in practice. Clear Identification: One of Roy Fielding&#39;s defined principles states that each resource must have a unique URL, simplifying the identification of the REST API. Unified Methods: REST uses the HTTP protocol and its commands, such as GET (retrieve a resource) and POST (create a resource). This principle remains consistent worldwide.</span></p>\n
        <h3 class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">GraphQL or REST: Which Approach Should You Choose for API Programming?</span></h3>\n
        <p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">The unsatisfying answer first: It depends. The relatively young GraphQL approach should not be understood as a replacement for programming a REST API but rather as an alternative, as both have their justification.</span></p>\n
        <p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">The application areas of GraphQL and REST are derived from their advantages and features. If your API, for example, needs to enable targeted data type queries and be expanded at any time, then GraphQL is likely the better choice as the query language enables particularly performant interfaces. Performance is also an important aspect in the e-commerce field, where GraphQL can excel, leading to the decision to release an official OXID API based on this language for interface development in the popular OXID eShop. An official REST API, on the other hand, does not yet exist.</span></p>\n
        <p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">For using REST in interface development, the advantage lies in its widespread use worldwide for more than two decades. If language- and location-independent development is a priority for your project, then REST should be your choice.</span></p>\n
        <h3 class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">ESYON: Your Expert in Interface Development</span></h3>\n
        <p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">ESYON is a certified partner for <a rel="noopener" href="" target="_blank">Microsoft Dynamics</a>, <a rel="noopener" href="" target="_blank">OXID eShop</a>, and <a rel="noopener" href="" target="_blank">Perfion</a>. With our specially developed interface solutions, we bring together the three worlds of online shop, ERP, and PIM. We are ready to support your project, whether it&#39;s project management, integrating new systems, or custom development. </span>Contact us!</p>                        </div>\r\n
                                                                        <div class="mt-3 text-left">\r\n
                                    <a href="/en/about-us/contact" class="btn mb-3 ps-0 btn-arrow">\r\n
                                        Contact us now                                                                    <i class="icon">\r\n
                                                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M489.4 278.6L512 256l-22.6-22.6-128-128L338.7 82.8 293.5 128l22.6 22.6L389.5 224 32 224 0 224l0 64 32 0 357.5 0-73.4 73.4L293.5 384l45.3 45.3 22.6-22.6 128-128z"></path></svg>\r\n
                                            </i>\r\n
                                                                    </a>\r\n
                                </div>\r\n
                                                                    </div>\r\n
                        </div>\r\n
                        \r\n
                                    </div>\r\n
                </div>\r\n
            </div>\r\n
        """
    }
  }
  "hasTeaser" => true
  "hasReader" => true
  "more" => "<a href="/news/graphql-vs-rest-which-is-better-for-interface-development" title="Read the article: GraphQL vs. REST: Which is Better for Interface Development?">Read more …<span class="invisible"> GraphQL vs. REST: Which is Better for Interface Development?</span></a>"
  "link" => "/news/graphql-vs-rest-which-is-better-for-interface-development"
  "hasText" => Closure() {#1495
    class: "Contao\Template"
    use: {
      $callback: Closure() {#1503 …}
    }
  }
  "authorModel" => Contao\UserModel {#1516
    #arrData: array:61 [
      "id" => 2
      "showHelp" => true
      "thumbnails" => true
      "useRTE" => true
      "useCE" => true
      "pwChange" => false
      "admin" => true
      "disable" => false
      "useTwoFactor" => false
      "tstamp" => 1704443590
      "username" => "Steffi"
      "name" => "Steffi Greuel"
      "email" => "steffi@con-creat.de"
      "language" => "de"
      "backendTheme" => "flexible"
      "uploader" => "DropZone"
      "password" => "$2y$13$EybE.B9ZNwurDoRi4/ddwOu2CHtbR8/ru6pz6/2FkMuehXyJuuEwG"
      "groups" => null
      "inherit" => "group"
      "modules" => "a:0:{}"
      "themes" => "a:0:{}"
      "elements" => "a:0:{}"
      "fields" => "a:0:{}"
      "pagemounts" => "a:0:{}"
      "alpty" => "a:0:{}"
      "filemounts" => "a:0:{}"
      "fop" => "a:0:{}"
      "imageSizes" => "a:0:{}"
      "forms" => "a:0:{}"
      "formp" => "a:0:{}"
      "amg" => "a:0:{}"
      "start" => ""
      "stop" => ""
      "session" => "a:13:{s:23:"tl_article_tl_page_tree";a:138:{i:1;i:1;i:332;i:0;i:333;i:0;i:71;i:1;i:371;i:0;i:375;i:0;i:311;i:0;i:11;i:1;i:381;i:0;i:72;i:0;i:334;i:0;i:335;i:0;i:336;i:0;i:337;i:1;i:90;i:1;i:96;i:0;i:99;i:0;i:100;i:0;i:101;i:0;i:110;i:0;i:102;i:0;i:301;i:0;i:104;i:0;i:143;i:0;i:365;i:0;i:366;i:0;i:367;i:0;i:368;i:1;i:93;i:0;i:411;i:0;i:412;i:0;i:413;i:0;i:414;i:0;i:415;i:0;i:416;i:0;i:417;i:0;i:418;i:0;i:419;i:0;i:420;i:0;i:421;i:0;i:422;i:0;i:423;i:0;i:424;i:0;i:425;i:0;i:426;i:0;i:427;i:0;i:428;i:0;i:429;i:0;i:430;i:0;i:431;i:0;i:432;i:0;i:433;i:0;i:434;i:0;i:435;i:0;i:436;i:0;i:437;i:0;i:438;i:0;i:439;i:0;i:370;i:0;i:2;i:0;i:380;i:0;i:307;i:1;i:309;i:0;i:310;i:0;i:139;i:0;i:5;i:0;i:7;i:0;i:14;i:0;i:34;i:0;i:18;i:0;i:19;i:0;i:109;i:0;i:67;i:0;i:68;i:0;i:127;i:0;i:379;i:0;i:299;i:0;i:142;i:0;i:303;i:0;i:374;i:0;i:4;i:0;i:373;i:0;i:321;i:0;i:319;i:0;i:6;i:0;i:12;i:0;i:8;i:0;i:13;i:0;i:66;i:0;i:95;i:0;i:92;i:1;i:91;i:0;i:114;i:0;i:94;i:0;i:382;i:0;i:383;i:0;i:384;i:0;i:385;i:0;i:386;i:0;i:387;i:0;i:388;i:0;i:389;i:0;i:390;i:0;i:391;i:0;i:392;i:0;i:393;i:0;i:394;i:0;i:395;i:0;i:396;i:0;i:397;i:0;i:398;i:0;i:399;i:0;i:400;i:0;i:401;i:0;i:402;i:0;i:403;i:0;i:404;i:0;i:405;i:0;i:406;i:0;i:407;i:0;i:408;i:0;i:409;i:0;i:21;i:0;i:314;i:0;i:313;i:0;i:112;i:0;i:442;i:0;i:440;i:0;i:441;i:0;i:444;i:0;i:300;i:0;i:20;i:0;i:27;i:0;i:30;i:0;i:443;i:0;i:445;i:0;i:449;i:0;i:450;i:0;}s:12:"tl_page_tree";a:260:{i:1;i:1;i:2;i:0;i:3;i:0;i:7;i:0;i:8;i:1;i:9;i:0;i:14;i:0;i:16;i:0;i:5;i:0;i:20;i:1;i:21;i:0;i:27;i:0;i:28;i:0;i:30;i:1;i:31;i:0;i:22;i:0;i:23;i:0;i:24;i:0;i:25;i:0;i:26;i:0;i:10;i:0;i:32;i:0;i:67;i:0;i:35;i:0;i:36;i:0;i:37;i:0;i:38;i:1;i:53;i:0;i:54;i:0;i:60;i:0;i:63;i:0;i:64;i:0;i:65;i:0;i:39;i:1;i:46;i:0;i:49;i:0;i:40;i:0;i:41;i:0;i:42;i:0;i:43;i:0;i:44;i:0;i:45;i:0;i:4;i:0;i:6;i:0;i:34;i:0;i:18;i:0;i:19;i:0;i:68;i:0;i:71;i:1;i:72;i:0;i:73;i:0;i:74;i:0;i:89;i:0;i:90;i:1;i:96;i:0;i:99;i:0;i:100;i:0;i:101;i:0;i:102;i:1;i:104;i:0;i:75;i:0;i:82;i:0;i:85;i:0;i:86;i:0;i:87;i:0;i:88;i:0;i:83;i:0;i:84;i:0;i:76;i:0;i:77;i:0;i:78;i:0;i:79;i:0;i:80;i:0;i:81;i:0;i:91;i:0;i:92;i:1;i:93;i:0;i:94;i:0;i:95;i:0;i:97;i:0;i:98;i:0;i:66;i:0;i:13;i:0;i:12;i:1;i:11;i:1;i:103;i:0;i:69;i:0;i:105;i:0;i:106;i:0;i:107;i:0;i:109;i:0;i:110;i:0;i:115;i:1;i:116;i:0;i:127;i:0;i:117;i:0;i:118;i:0;i:119;i:0;i:120;i:0;i:121;i:0;i:122;i:0;i:123;i:0;i:124;i:0;i:125;i:0;i:139;i:0;i:142;i:0;i:143;i:0;i:128;i:1;i:138;i:0;i:137;i:0;i:136;i:0;i:135;i:0;i:134;i:0;i:133;i:0;i:132;i:0;i:130;i:0;i:131;i:0;i:129;i:0;i:17;i:0;i:126;i:0;i:157;i:0;i:248;i:0;i:299;i:0;i:303;i:0;i:301;i:1;i:307;i:1;i:308;i:0;i:309;i:1;i:317;i:0;i:312;i:1;i:326;i:0;i:325;i:0;i:324;i:0;i:323;i:0;i:322;i:0;i:311;i:0;i:321;i:0;i:320;i:0;i:319;i:0;i:318;i:0;i:310;i:1;i:327;i:0;i:328;i:0;i:140;i:0;i:332;i:0;i:333;i:0;i:314;i:0;i:313;i:0;i:334;i:0;i:338;i:1;i:339;i:0;i:340;i:0;i:341;i:0;i:342;i:0;i:343;i:0;i:344;i:0;i:345;i:0;i:346;i:0;i:347;i:0;i:348;i:0;i:349;i:0;i:350;i:0;i:351;i:0;i:352;i:0;i:353;i:0;i:354;i:0;i:33;i:0;i:336;i:1;i:355;i:0;i:356;i:0;i:357;i:0;i:358;i:0;i:359;i:0;i:335;i:0;i:114;i:0;i:360;i:0;i:361;i:0;i:362;i:1;i:363;i:0;i:364;i:0;i:337;i:1;i:365;i:0;i:366;i:0;i:367;i:0;i:368;i:1;i:369;i:0;i:112;i:0;i:370;i:0;i:300;i:0;i:302;i:0;i:371;i:1;i:372;i:0;i:375;i:0;i:374;i:0;i:377;i:0;i:373;i:0;i:381;i:1;i:380;i:0;i:379;i:0;i:411;i:0;i:412;i:0;i:413;i:0;i:414;i:0;i:415;i:0;i:416;i:0;i:417;i:0;i:418;i:0;i:419;i:0;i:420;i:0;i:421;i:0;i:422;i:0;i:423;i:0;i:424;i:0;i:425;i:0;i:426;i:0;i:427;i:0;i:428;i:0;i:429;i:0;i:430;i:0;i:431;i:0;i:432;i:0;i:433;i:0;i:434;i:0;i:435;i:0;i:436;i:0;i:437;i:0;i:438;i:0;i:439;i:0;i:382;i:0;i:383;i:0;i:384;i:0;i:385;i:0;i:386;i:0;i:387;i:0;i:388;i:0;i:389;i:0;i:390;i:0;i:391;i:0;i:392;i:0;i:393;i:0;i:394;i:0;i:395;i:0;i:396;i:0;i:397;i:0;i:398;i:0;i:399;i:0;i:400;i:0;i:401;i:0;i:402;i:0;i:403;i:0;i:404;i:0;i:405;i:0;i:406;i:0;i:407;i:0;i:408;i:0;i:409;i:0;i:447;i:0;i:441;i:0;i:444;i:0;i:448;i:0;}s:11:"new_records";a:0:{}s:12:"tl_page_node";s:1:"0";s:15:"fieldset_states";a:16:{s:15:"tl_news_archive";a:2:{s:16:"protected_legend";i:1;s:15:"comments_legend";i:1;}s:10:"tl_content";a:8:{s:16:"invisible_legend";i:1;s:13:"expert_legend";i:1;s:15:"template_legend";i:0;s:16:"protected_legend";i:0;s:11:"rsce_legend";i:1;s:35:"pal_rsce_field_tags_rsce_list_start";i:0;s:36:"pal_rsce_field_items_rsce_list_start";i:1;s:13:"poster_legend";i:1;}s:10:"tl_article";a:4:{s:13:"expert_legend";i:1;s:15:"template_legend";i:1;s:16:"protected_legend";i:1;s:13:"teaser_legend";i:1;}s:7:"tl_page";a:17:{s:12:"chmod_legend";i:1;s:12:"cache_legend";i:1;s:13:"layout_legend";i:1;s:16:"protected_legend";i:1;s:16:"canonical_legend";i:1;s:13:"tabnav_legend";i:0;s:13:"expert_legend";i:1;s:15:"language_legend";i:1;s:11:"meta_legend";i:1;s:16:"twoFactor_legend";i:1;s:14:"website_legend";i:1;s:13:"global_legend";i:1;s:12:"image_legend";i:0;s:16:"opengraph_legend";i:1;s:12:"title_legend";i:1;s:14:"routing_legend";i:1;s:17:"contao_seo_legend";i:0;}s:9:"tl_module";a:4:{s:15:"template_legend";i:1;s:16:"protected_legend";i:1;s:13:"expert_legend";i:1;s:12:"image_legend";i:1;}s:7:"tl_user";a:3:{s:14:"backend_legend";i:0;s:15:"password_legend";i:1;s:12:"theme_legend";i:0;}s:13:"tl_form_field";a:3:{s:13:"expert_legend";i:1;s:15:"template_legend";i:1;s:16:"invisible_legend";i:1;}s:11:"tl_settings";a:4:{s:14:"uploads_legend";i:1;s:12:"files_legend";i:1;s:15:"security_legend";i:1;s:14:"backend_legend";i:1;}s:7:"tl_news";a:4:{s:13:"expert_legend";i:1;s:16:"enclosure_legend";i:1;s:11:"tags_legend";i:1;s:13:"source_legend";i:1;}s:15:"tl_faq_category";a:1:{s:15:"comments_legend";i:1;}s:6:"tl_faq";a:2:{s:13:"expert_legend";i:1;s:16:"enclosure_legend";i:1;}s:13:"tl_image_size";a:2:{s:13:"expert_legend";i:1;s:15:"metadata_legend";i:0;}s:15:"tl_member_group";a:1:{s:15:"redirect_legend";i:1;}s:7:"tl_form";a:3:{s:12:"store_legend";i:1;s:15:"template_legend";i:1;s:13:"expert_legend";i:1;}s:18:"tl_image_size_item";a:1:{s:17:"visibility_legend";i:1;}s:12:"tl_cookiebar";a:1:{s:13:"expert_legend";i:1;}}s:8:"filetree";a:67:{s:8:"976bf09e";i:1;s:8:"28ce87ed";i:0;s:8:"87b6bb18";i:1;i:65613443;i:0;s:8:"abd28c11";i:0;s:8:"3a03408a";i:0;s:8:"0664460a";i:1;s:8:"de1dddc1";i:0;s:8:"6d376608";i:0;s:8:"e0afc680";i:1;s:8:"c6349057";i:0;s:8:"34a3d469";i:0;s:8:"c5989b1e";i:0;s:8:"1b20f57a";i:1;s:8:"fd52a518";i:0;s:8:"71c85865";i:0;s:8:"337dedf0";i:0;s:8:"496f30f5";i:1;s:8:"936b0edd";i:0;s:8:"2c469a15";i:0;s:8:"f14afdf3";i:0;s:8:"6005df7b";i:0;s:8:"180add45";i:0;s:8:"b582bb69";i:0;s:8:"c54a1897";i:0;s:8:"d06bcb2b";i:0;s:8:"d73e0625";i:0;s:8:"0d33e3ed";i:0;s:8:"cd1a05e0";i:0;s:8:"de745548";i:0;s:8:"e81bcde6";i:0;s:8:"b8f166ac";i:0;s:8:"ec65a4b1";i:0;s:8:"ca1e3332";i:0;s:8:"3d42888b";i:0;s:8:"39549bf8";i:0;s:8:"5e67538f";i:0;s:8:"e96e490f";i:0;s:8:"b0a5fecd";i:1;s:8:"eb081ed5";i:0;s:8:"20e69e59";i:0;s:8:"3bb56b08";i:0;s:8:"c2f05151";i:0;s:8:"2c252862";i:0;s:8:"c16a7fd7";i:0;s:8:"9eb5c47e";i:0;s:8:"34a4549b";i:0;s:8:"4970fa81";i:0;s:8:"c9b0e9cc";i:0;s:8:"a634aea2";i:0;s:8:"e2cac7d4";i:0;s:8:"0838c97d";i:0;s:8:"ba1b4d4c";i:0;s:8:"9780eedc";i:0;s:8:"f64bff50";i:0;s:8:"8f250a59";i:1;s:8:"579a95f0";i:0;s:8:"3054a4b2";i:0;s:8:"a069e128";i:0;s:8:"f8fdb260";i:1;s:8:"9371fc93";i:0;i:77837580;i:0;s:8:"64b99183";i:0;s:8:"203bb855";i:0;s:8:"b6f129e5";i:0;s:8:"2392d0d6";i:0;s:8:"da8e6c6b";i:1;}s:13:"tl_files_node";s:0:"";s:6:"search";a:7:{s:14:"tl_url_rewrite";a:2:{s:5:"field";s:4:"name";s:5:"value";s:10:"referenzen";}s:15:"tl_news_archive";a:2:{s:5:"field";s:5:"title";s:5:"value";s:0:"";}s:9:"tl_module";a:2:{s:5:"field";s:4:"name";s:5:"value";s:0:"";}s:7:"tl_news";a:2:{s:5:"field";s:8:"headline";s:5:"value";s:0:"";}s:7:"tl_page";a:2:{s:5:"field";s:5:"title";s:5:"value";s:0:"";}s:10:"tl_article";a:2:{s:5:"field";s:5:"title";s:5:"value";s:0:"";}s:8:"tl_files";a:1:{s:5:"value";s:7:"daniela";}}s:6:"filter";a:9:{s:10:"tl_news_12";a:1:{s:5:"limit";s:4:"0,30";}s:9:"tl_news_1";a:1:{s:5:"limit";s:4:"0,30";}s:9:"tl_news_2";a:1:{s:5:"limit";s:4:"0,30";}s:6:"tl_log";a:1:{s:5:"limit";s:4:"0,30";}s:11:"tl_module_1";a:1:{s:5:"limit";s:5:"60,30";}s:14:"tl_url_rewrite";a:1:{s:5:"limit";s:4:"0,30";}s:15:"tl_news_archive";a:0:{}s:9:"tl_news_9";a:1:{s:5:"limit";s:4:"0,30";}s:10:"tl_news_14";a:1:{s:5:"limit";s:4:"0,30";}}s:7:"sorting";a:3:{s:14:"tl_url_rewrite";s:4:"name";s:9:"tl_module";s:4:"name";s:7:"tl_news";s:9:"date DESC";}s:15:"checkbox_groups";a:3:{s:20:"cbc_modules_benutzer";i:1;s:18:"cbc_modules_layout";i:1;s:30:"cbc_imageSizes_eigene-größen";i:1;}s:15:"backend_modules";a:3:{s:8:"accounts";i:1;s:7:"content";i:1;s:6:"design";i:1;}s:26:"template_studio_theme_slug";N;}"
      "dateAdded" => 1683037237
      "secret" => null
      "lastLogin" => 1772003693
      "currentLogin" => 1772023309
      "backupCodes" => null
      "trustedTokenVersion" => 0
      "faqs" => "a:0:{}"
      "faqp" => "a:0:{}"
      "news" => "a:0:{}"
      "newp" => "a:0:{}"
      "calendars" => "a:0:{}"
      "calendarp" => "a:0:{}"
      "calendarfeeds" => "a:0:{}"
      "calendarfeedp" => "a:0:{}"
      "newsletters" => "a:0:{}"
      "newsletterp" => "a:0:{}"
      "doNotCollapse" => false
      "pageLanguageLabels" => null
      "frontendModules" => "a:0:{}"
      "rocksolidFrontendHelperOperations" => "a:0:{}"
      "rocksolidFrontendHelperContentElements" => "a:0:{}"
      "rocksolidFrontendHelper" => "1"
      "rocksolidFrontendHelperLightbox" => "1"
      "pdirSeoPlugin" => "a:0:{}"
      "pdirSeoPluginRewriteWidget" => "0"
      "tags_disable_add_new" => "a:0:{}"
      "doNotHideMessages" => false
    ]
    #arrModified: []
    #arrRelations: array:9 [
      "groups" => array:4 [
        "table" => "tl_user_group"
        "field" => "id"
        "type" => "belongsToMany"
        "load" => "lazy"
      ]
      "pagemounts" => array:4 [
        "table" => "tl_page"
        "field" => "id"
        "type" => "hasMany"
        "load" => "lazy"
      ]
      "forms" => array:4 [
        "table" => "tl_form"
        "field" => "id"
        "type" => "hasMany"
        "load" => "lazy"
      ]
      "amg" => array:4 [
        "table" => "tl_member_group"
        "field" => "id"
        "type" => "hasMany"
        "load" => "lazy"
      ]
      "faqs" => array:4 [
        "table" => "tl_faq_category"
        "field" => "id"
        "type" => "hasMany"
        "load" => "lazy"
      ]
      "news" => array:4 [
        "table" => "tl_news_archive"
        "field" => "id"
        "type" => "hasMany"
        "load" => "lazy"
      ]
      "calendars" => array:4 [
        "table" => "tl_calendar"
        "field" => "id"
        "type" => "hasMany"
        "load" => "lazy"
      ]
      "calendarfeeds" => array:4 [
        "table" => "tl_calendar_feed"
        "field" => "id"
        "type" => "hasMany"
        "load" => "lazy"
      ]
      "newsletters" => array:4 [
        "table" => "tl_newsletter_channel"
        "field" => "id"
        "type" => "hasMany"
        "load" => "lazy"
      ]
    ]
    #arrRelated: []
    #arrEnums: []
    #blnPreventSaving: false
  }
  "numberOfComments" => 0
  "commentCount" => "(comments: 0)"
  "timestamp" => 1689674880
  "datetime" => "2023-07-18T12:08:00+02:00"
  "addBefore" => true
  "picture" => array:4 [
    "img" => array:6 [
      "srcset" => "/assets/images/t/graphql-vs-rest-1-670x415-7x5qq6cthn4qjwg.jpg 1x, /assets/images/2/graphql-vs-rest-1-670x415-0p7k9xqarhdszs1.jpg 1.5x"
      "src" => "/assets/images/t/graphql-vs-rest-1-670x415-7x5qq6cthn4qjwg.jpg"
      "width" => 408
      "height" => 257
      "loading" => "lazy"
      "hasSingleAspectRatio" => true
    ]
    "sources" => array:1 [
      0 => array:5 [
        "srcset" => "/assets/images/y/graphql-vs-rest-1-670x415-wpdeadyhc79pd88.webp 1x, /assets/images/z/graphql-vs-rest-1-670x415-dwhwb95zs7nn1f9.webp 1.5x"
        "src" => "/assets/images/y/graphql-vs-rest-1-670x415-wpdeadyhc79pd88.webp"
        "width" => 408
        "height" => 257
        "type" => "image/webp"
      ]
    ]
    "alt" => "Person working with a laptop"
    "title" => ""
  ]
  "width" => 670
  "height" => 415
  "arrSize" => array:7 [
    0 => 408
    1 => 257
    2 => 2
    3 => "width="408" height="257""
    "bits" => 8
    "channels" => 3
    "mime" => "image/jpeg"
  ]
  "imgSize" => " width="408" height="257""
  "src" => "/assets/images/t/graphql-vs-rest-1-670x415-7x5qq6cthn4qjwg.jpg"
  "license" => ""
  "uuid" => "cadae24e-ef42-11ed-9dc1-03dc47cc2e7f"
  "floatClass" => " float_above"
  "figure" => Contao\CoreBundle\Image\Studio\Figure {#1521
    -image: Contao\CoreBundle\Image\Studio\ImageResult {#1517
      -picture: Contao\Image\Picture {#1552
        -img: array:6 [
          "srcset" => array:2 [
            0 => array:2 [
              0 => Contao\Image\DeferredImage {#1544
                #path: "/www/htdocs/w01e7d56/esyon/blue/assets/images/t/graphql-vs-rest-1-670x415-7x5qq6cthn4qjwg.jpg"
                #dimensions: Contao\Image\ImageDimensions {#1548
                  -size: Imagine\Image\Box {#1534
                    -width: 408
                    -height: 257
                  }
                  -orientation: 1
                  -relative: false
                  -undefined: false
                }
                #imagine: Imagine\Imagick\Imagine {#1430
                  -metadataReader: null
                  -classFactory: null
                }
                -importantPart: null
              }
              1 => "1x"
            ]
            1 => array:2 [
              0 => Contao\Image\DeferredImage {#1547
                #path: "/www/htdocs/w01e7d56/esyon/blue/assets/images/2/graphql-vs-rest-1-670x415-0p7k9xqarhdszs1.jpg"
                #dimensions: Contao\Image\ImageDimensions {#1551
                  -size: Imagine\Image\Box {#1549
                    -width: 612
                    -height: 386
                  }
                  -orientation: 1
                  -relative: false
                  -undefined: false
                }
                #imagine: Imagine\Imagick\Imagine {#1430}
                -importantPart: null
              }
              1 => "1.5x"
            ]
          ]
          "src" => Contao\Image\DeferredImage {#1544}
          "width" => 408
          "height" => 257
          "loading" => "lazy"
          "hasSingleAspectRatio" => true
        ]
        -sources: array:1 [
          0 => array:5 [
            "srcset" => array:2 [
              0 => array:2 [
                0 => Contao\Image\DeferredImage {#1543
                  #path: "/www/htdocs/w01e7d56/esyon/blue/assets/images/y/graphql-vs-rest-1-670x415-wpdeadyhc79pd88.webp"
                  #dimensions: Contao\Image\ImageDimensions {#1554
                    -size: Imagine\Image\Box {#1545
                      -width: 408
                      -height: 257
                    }
                    -orientation: 1
                    -relative: false
                    -undefined: false
                  }
                  #imagine: Imagine\Imagick\Imagine {#1430}
                  -importantPart: null
                }
                1 => "1x"
              ]
              1 => array:2 [
                0 => Contao\Image\DeferredImage {#1553
                  #path: "/www/htdocs/w01e7d56/esyon/blue/assets/images/z/graphql-vs-rest-1-670x415-dwhwb95zs7nn1f9.webp"
                  #dimensions: Contao\Image\ImageDimensions {#1557
                    -size: Imagine\Image\Box {#1555
                      -width: 612
                      -height: 386
                    }
                    -orientation: 1
                    -relative: false
                    -undefined: false
                  }
                  #imagine: Imagine\Imagick\Imagine {#1430}
                  -importantPart: null
                }
                1 => "1.5x"
              ]
            ]
            "src" => Contao\Image\DeferredImage {#1543}
            "width" => 408
            "height" => 257
            "type" => "image/webp"
          ]
        ]
      }
      -originalDimensions: Contao\Image\ImageDimensions {#1526
        -size: Imagine\Image\Box {#1525
          -width: 670
          -height: 415
        }
        -orientation: 1
        -relative: false
        -undefined: false
      }
      -locator: Symfony\Component\DependencyInjection\Argument\ServiceLocator {#1447
        -externalId: null
        -container: null
        -loading: []
        -providedTypes: ? array
        -factories: array:10 [
          "contao.assets.files_context" => array:4 [
            0 => "services"
            1 => "contao.assets.files_context"
            2 => "getContao_Assets_FilesContextService"
            3 => false
          ]
          "contao.filesystem.virtual.files" => array:4 [
            0 => "privates"
            1 => "contao.filesystem.virtual.files"
            2 => "getContao_Filesystem_Virtual_FilesService"
            3 => true
          ]
          "contao.framework" => array:4 [
            0 => "services"
            1 => "contao.framework"
            2 => "getContao_FrameworkService"
            3 => false
          ]
          "contao.image.factory" => array:4 [
            0 => "services"
            1 => "contao.image.factory"
            2 => "getContao_Image_FactoryService"
            3 => true
          ]
          "contao.image.picture_factory" => array:4 [
            0 => "services"
            1 => "contao.image.picture_factory"
            2 => "getContao_Image_PictureFactoryService"
            3 => true
          ]
          "contao.image.resizer" => array:4 [
            0 => "services"
            1 => "contao.image.resizer"
            2 => "getContao_Image_ResizerService"
            3 => true
          ]
          "contao.image.studio" => array:4 [
            0 => "services"
            1 => "contao.image.studio"
            2 => "getContao_Image_StudioService"
            3 => true
          ]
          "contao.insert_tag.parser" => array:4 [
            0 => "services"
            1 => "contao.insert_tag.parser"
            2 => "getContao_InsertTag_ParserService"
            3 => true
          ]
          "contao.routing.page_finder" => array:4 [
            0 => "services"
            1 => "contao.routing.page_finder"
            2 => "getContao_Routing_PageFinderService"
            3 => false
          ]
          "event_dispatcher" => array:4 [
            0 => "services"
            1 => "event_dispatcher"
            2 => "getEventDispatcherService"
            3 => false
          ]
        ]
        -factory: Container5TwdPAy\Contao_ManagerBundle_HttpKernel_ContaoKernelProdContainer::getService(string|false $registry, string $id, ?string $method, string|bool $load): mixed {#115
          returnType: "mixed"
          this: Container5TwdPAy\Contao_ManagerBundle_HttpKernel_ContaoKernelProdContainer {#137 …}
        }
        -serviceMap: array:10 [
          "contao.assets.files_context" => array:4 [
            0 => "services"
            1 => "contao.assets.files_context"
            2 => "getContao_Assets_FilesContextService"
            3 => false
          ]
          "contao.filesystem.virtual.files" => array:4 [
            0 => "privates"
            1 => "contao.filesystem.virtual.files"
            2 => "getContao_Filesystem_Virtual_FilesService"
            3 => true
          ]
          "contao.framework" => array:4 [
            0 => "services"
            1 => "contao.framework"
            2 => "getContao_FrameworkService"
            3 => false
          ]
          "contao.image.factory" => array:4 [
            0 => "services"
            1 => "contao.image.factory"
            2 => "getContao_Image_FactoryService"
            3 => true
          ]
          "contao.image.picture_factory" => array:4 [
            0 => "services"
            1 => "contao.image.picture_factory"
            2 => "getContao_Image_PictureFactoryService"
            3 => true
          ]
          "contao.image.resizer" => array:4 [
            0 => "services"
            1 => "contao.image.resizer"
            2 => "getContao_Image_ResizerService"
            3 => true
          ]
          "contao.image.studio" => array:4 [
            0 => "services"
            1 => "contao.image.studio"
            2 => "getContao_Image_StudioService"
            3 => true
          ]
          "contao.insert_tag.parser" => array:4 [
            0 => "services"
            1 => "contao.insert_tag.parser"
            2 => "getContao_InsertTag_ParserService"
            3 => true
          ]
          "contao.routing.page_finder" => array:4 [
            0 => "services"
            1 => "contao.routing.page_finder"
            2 => "getContao_Routing_PageFinderService"
            3 => false
          ]
          "event_dispatcher" => array:4 [
            0 => "services"
            1 => "event_dispatcher"
            2 => "getEventDispatcherService"
            3 => false
          ]
        ]
        -serviceTypes: array:10 [
          "contao.assets.files_context" => "?"
          "contao.filesystem.virtual.files" => "?"
          "contao.framework" => "?"
          "contao.image.factory" => "?"
          "contao.image.picture_factory" => "?"
          "contao.image.resizer" => "?"
          "contao.image.studio" => "?"
          "contao.insert_tag.parser" => "?"
          "contao.routing.page_finder" => "?"
          "event_dispatcher" => "?"
        ]
      }
      -projectDir: "/www/htdocs/w01e7d56/esyon/blue"
      -filePathOrImageInterface: "/www/htdocs/w01e7d56/esyon/blue/files/content/blog/content/graphql-vs-rest-1-670x415.jpg"
      -sizeConfiguration: "a:3:{i:0;s:0:"";i:1;s:0:"";i:2;s:1:"2";}"
      -resizeOptions: null
    }
    -metadata: Contao\CoreBundle\File\Metadata {#1530
      -values: array:6 [
        "title" => ""
        "alt" => "Person working with a laptop"
        "link" => ""
        "caption" => ""
        "license" => ""
        "uuid" => "cadae24e-ef42-11ed-9dc1-03dc47cc2e7f"
      ]
      -schemaOrgJsonLd: null
    }
    -linkAttributes: array:1 [
      "href" => ""
    ]
    -lightbox: null
    -options: []
  }
  "tagsRaw" => array:1 [
    0 => array:5 [
      "id" => 3
      "tag" => "E-Commerce"
      "tstamp" => 1761740264
      "translation" => "a:0:{}"
      "title" => "E-Commerce"
    ]
  ]
  "getSchemaOrgData" => Closure(): array {#1527
    returnType: "array"
    class: "InspiredMinds\ContaoLanguageAutoswitch\Module\NewsReaderModule"
    use: {
      $objArticle: Contao\NewsModel {#1502 …}
      $objTemplate: Contao\FrontendTemplate {#1501 …}
    }
  }
]
Person working with a laptop
E-Commerce E-Commerce

Steffi Greuel 3 Minutes

GraphQL vs. REST: Which is Better for Interface Development?

A Brief Overview

GraphQL and REST

The REST or RESTful architecture is the result of a doctoral thesis by Roy Fielding, a US computer scientist, in 2000. His REST protocol is based on six principles, with the principle of statelessness being essential for the structure of interfaces (REST APIs) programmed with REST. It states that each message must contain all the necessary information for understanding. Although REST is generally compatible with any protocol or file format, the HTTP protocol is commonly used for data transfer, usually via JSON (JavaScript Object Notation).

For more than a decade, the REST architecture remained uncontested as the standard for creating interfaces until Facebook developed the query language GraphQL in 2012. It is now open-source and has been handed over to the Linux Foundation. REST and GraphQL follow different paths for data processing. While REST transmits all information of a query, GraphQL only transfers necessary data. To achieve this, queries are matched with schemas created by developers, and so-called resolvers assign appropriate values to the queried object types.

Advantages of GraphQL

Targeted Data Retrieval: Only the requested data is returned, preventing the retrieval of irrelevant information (no overfetching). Reduced Room for Miscommunication: By defining object types in GraphQL queries, miscommunication between client and server can be avoided. Evolution without Versioning: An API can be enriched with new features without affecting existing queries. No Specific Application Structure: GraphQL can be installed on an existing REST API and used with classic API management tools, such as Microsoft Azure's API Management.

Advantages of REST

Established Approach: REST has been widely used in interface programming for over 20 years, making it a well-established approach in practice. Clear Identification: One of Roy Fielding's defined principles states that each resource must have a unique URL, simplifying the identification of the REST API. Unified Methods: REST uses the HTTP protocol and its commands, such as GET (retrieve a resource) and POST (create a resource). This principle remains consistent worldwide.

GraphQL or REST: Which Approach Should You Choose for API Programming?

The unsatisfying answer first: It depends. The relatively young GraphQL approach should not be understood as a replacement for programming a REST API but rather as an alternative, as both have their justification.

The application areas of GraphQL and REST are derived from their advantages and features. If your API, for example, needs to enable targeted data type queries and be expanded at any time, then GraphQL is likely the better choice as the query language enables particularly performant interfaces. Performance is also an important aspect in the e-commerce field, where GraphQL can excel, leading to the decision to release an official OXID API based on this language for interface development in the popular OXID eShop. An official REST API, on the other hand, does not yet exist.

For using REST in interface development, the advantage lies in its widespread use worldwide for more than two decades. If language- and location-independent development is a priority for your project, then REST should be your choice.

ESYON: Your Expert in Interface Development

ESYON is a certified partner for Microsoft Dynamics, OXID eShop, and Perfion. With our specially developed interface solutions, we bring together the three worlds of online shop, ERP, and PIM. We are ready to support your project, whether it's project management, integrating new systems, or custom development. Contact us!