Module Directory 文档
| 2018.03.13
create module directory
Request
{
"query":
"mutation create_module_directory {
create_module_directory(
store_id:66,
input: [
{
name:\"name1\",
module_id:1,
items:[
{ name:\"name2\",
module_id:2,items:[]
}
]}]) { id,items } }"
}
Response
{
"data": {
"create_module_directory": {
"id": 8,
"items": [
{
"name": "name1",
"module_id": 1,
"items": [
{
"name": "name2",
"module_id": 2,
"items": null
}
]
}
]
}
}
}
module directory
Request
{
"query":"query module_directory { module_directory(store_id:66) { id, store_id, items } }"
}
Response
{
"data": {
"module_directory": {
"id": 8,
"store_id": 66,
"items": [
{
"name": "name1",
"module_id": 1,
"items": [
{
"name": "name2",
"module_id": 2,
"items": null
}
]
}
]
}
}
}
module directory history
Request
{
"query":"query module_directory_history { module_directory_history(store_id:66) { id, store_id, items } }"
}
Response
{
"data": {
"module_directory_history": [
{
"id": 9,
"store_id": 66,
"items": [
{
"name": "name3",
"module_id": 1,
"items": [
{
"name": "name4",
"module_id": 2,
"items": null
}
]
}
]
},
{
"id": 8,
"store_id": 66,
"items": [
{
"name": "name1",
"module_id": 1,
"items": [
{
"name": "name2",
"module_id": 2,
"items": null
}
]
}
]
}
]
}
}
create module
Request
{
"query":"mutation create_module { create_module(store_id:5417,input:{store_id:0,name:\"bindo4\"}) { id,name,module_page{type,param}} }"
}
Response
{
"data": {
"create_module": {
"id": 17,
"name": "bindo4",
"module_page": null
}
}
}
update module
Request
{
"query":"mutation update_module { update_module(store_id:5417,module_id:12,input:{store_id:0,name:\"bindo update\"}) { id,name,module_page{type,param}} }"
}
Response
{
"data": {
"update_module": {
"id": 12,
"name": "bindo update",
"module_page": null
}
}
}
delete module
Request
{
"query":"mutation delete_module { delete_module(store_id:5417,module_id:12) { success}}"
}
Response
{
"data": {
"delete_module": {
"success": true
}
}
}
query module
Request
{
"query":"query module { module(store_id:5417,module_id:13){id,name} }"
}
Response
{
"data": {
"module": {
"id": 13,
"name": "bindo4"
}
}
}
query modules
Request
{
"query":"query modules { modules(store_id:5417){id,name} }"
}
Response
{
"data": {
"modules": [
{
"id": 5,
"name": "bindo"
},
{
"id": 17,
"name": "bindo4"
}
]
}
}
create module page
Request
{
"query":"mutation create_module_page { create_module_page(store_id:5417,input:{module_id:17,type:\"custom_page\",param:\"www.bindo.com\",name:\"test2\"}) { module_id,type,param,name} }"
}
Response
{
"data": {
"create_module_page": {
"module_id": 17,
"type": "custom_page",
"param": "www.bindo.com",
"name": "test2"
}
}
}
update module page
Request
{
"query":"mutation update_module_page { update_module_page(store_id:5417,module_page_id:4,input:{module_id:17,type:\"custom_page\",param:\"www.bindo.com\",name:\"test4\"}) { module_id,type,param,name} }"
}
Response
{
"data": {
"update_module_page": {
"module_id": 17,
"type": "custom_page",
"param": "www.bindo.com",
"name": "test4"
}
}
}
delete module page
Request
{
"query":"mutation delete_module_page { delete_module_page(store_id:5417,module_page_id:4) { success} }"
}
Response
{
"data": {
"delete_module_page": {
"success": true
}
}
}
query module page
Request
{
"query":"query module_page { module_page(store_id:5417,module_page_id:5){id,name} }"
}
Response
{
"data": {
"module_page": {
"id": 5,
"name": "test2"
}
}
}
query module pages
Request
{
"query":"query module_pages { module_pages(store_id:5417,module_id:15){id,name} }"
}
Response
{
"data": {
"module_pages": [
{
"id": 5,
"name": "test2"
},
{
"id": 6,
"name": "test2"
}
]
}
}
网友评论