在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):WeLikeGraphQL/wordpress-graphql-api-example开源软件地址(OpenSource Url):https://github.com/WeLikeGraphQL/wordpress-graphql-api-example开源编程语言(OpenSource Language):PHP 71.9%开源软件介绍(OpenSource Introduction):wordpress-graphql-api-example
Here is the app that consumes this API. ExecutionThe project can be run using one of the following (what is convenient for you): Vagrant - for one-command virtual machine provisioning in Windows, Linux, OSX... (the best option when Ansible/Docker not installed). Requirements: Vagrant >=1.8 Ansible - for one-command own host provisioning and containerizing the app in Linux (the best option when Docker not installed). Requirements: ansible-playbook Docker - for containerizing the app in Linux. Requirements: docker, docker-compose, local-persist Manually - (any OS, required Apache2/Nginx, PHP >= 5.6, MySQL, Composer etc.) We give you a lot of installation options, because we assume that not every developer will come from PHP World and have already installed all needed stuff for manual set-up. If you are not interested in the backend part, just choose the simplest way of installation and run the Web App, which consumes this Wordpress GraphQL API. The project publishes the following endpoints:
You can customize data in Vagrant (for Windows, Linux, OSX)Vagrant makes the project executable in Windows, Linux, OSX... (as Docker is available out-of-the-box only for some Linux instances). So, if you want to set everything up automatically, then install Vagrant>=1.8 and execute:
It might take some time for running the project at first, as all dependencies have to be downloaded, but it is all what you need to do to run the API. Check Sample data are included automatically after every run. Ansible (for Linux)If you do not have Docker installed, then you can install everything using Ansible. Invoke:
It will install and run the needed stuff on your host (now you have Docker installed and you can use in the second run). Sample data are included automatically thanks to the second command. If you have Linux distribution that is not supported by Docker and it causes errors, then change the following part in
onto one of supported distributions ( Docker (for Linux)You can use Docker Compose in order to set everything up and containerize automatically. Install local-persist docker plugin and just execute:
Sample data are included automatically thanks to the second command. Manually (for Windows, Linux, OSX)
BackupIf you wish to do a database backup, then execute one of the following (depending how you set up the project):
GraphiQLIt is recommended to explore possibilities of GraphQL API Endpoint. The fastest way to do it is to use one of the following solutions: But you can also set up the original tool created by GraphQL Team: GraphiQL Screenshot from ChromeiQL: AcknowledgementsThanks for @tim-field, who published his work: graphql-wp |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论