未加星标

A GraphQL Bundle adds protocol support to eZ Platform Symfony CMS

字体大小 | |
[开发(php) 所属分类 开发(php) | 发布者 店小二05 | 时间 2016 | 作者 红领巾 ] 0人收藏点击收藏

GraphQL is a technology that allows developers to make queries (and mutations) against an external interface in a structured way. It is similar to REST APIs, but as a more complete specification it is universal and allows true decoupling from a CMS, rather than building on a specific REST implementation of a system.

The technology originates from Facebook and together with React has quite a bit of momentum currently. In a recent experiment Bertrand Dunogier from the eZ Systems engineering team in Lyon created an extension to the Open Source eZ Platform Symfony CMS that allows developers access the content repository in an alternative way to the available REST API .

Building on existing work from the Overblog and Webonyx teams, the eZ Platform GraphQL Bundle enables developers to query the content repository provided by eZ Platform using the exact same protocol and methods as a number of other tools, including GraphQL enabled client libraries like Apollo .

With aphp port of the GraphQL javascript reference implementation and a Symfony integration layer on top, the eZ Platform GraphQL Bundle simply adds an integration layer to the Open Source CMS. This enabled a single developer to achieve impressive results in a matter of days, which is largely thanks to being able to leverage previous efforts using Composer and Symfony.

The source code of the GraphQL Bundle is currently available on Github and one can install it, but as a quick test there is also an online demo available on Platform.sh . With this demo you can test how queries behave using the Graphiql , an in-browser IDE for exploring GraphQL.

The demo installation is not guaranteed to be available for long term, so below is a screenshot of an example query that fetches all children of a tree and displays only the rich text values from those fields, in html5 format:


A GraphQL Bundle adds protocol support to eZ Platform Symfony CMS

All in all this is a perfect example of how Symfony and the broader PHP ecosystem allow accelerated development and experimentation on new features without rewriting core functionalities from scratch.

本文开发(php)相关术语:php代码审计工具 php开发工程师 移动开发者大会 移动互联网开发 web开发工程师 软件开发流程 软件开发工程师

主题: RESTPHPGitReactJavaScriptHTMLJavaHTML5Facebook
分页:12
转载请注明
本文标题:A GraphQL Bundle adds protocol support to eZ Platform Symfony CMS
本站链接:http://www.codesec.net/view/481742.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 开发(php) | 评论(0) | 阅读(29)