Playing with graphql
Iván Corrales Solera edited this page Apr 1, 2018
·
1 revision
GraphiQL is interated with MollyDB
Once the system si launched you can deal with MollyDB by making use of GraphiQL. GraphiQL is deployed in the same port that mollydb. So assuming you use the default port 9090, once you have launched molly you can open the browser and play with GraphiQL
Below some examples of graphql queries and mutations used to test manually the system:
mutation registerI18nDirectory {
register(path: "resources/data/i18n", name: "i18n") {
name
}
}
mutation registerDatabaseDirectory {
register(path: "resources/data/databases", name: "db") {
name
}
}
mutation registerMicroservicesDirectory {
register(path: "resources/data/microservices", name: "ms") {
name
}
}
query StorageQuery {
storagesList {
name
len
documents(name:"mongodb"){
name
len
properties {
key
value
path
}
}
}
}
query FindProperties {
properties(storage: "ms", property: "log.level") {
path
key
value
}
}
query PropertyPath {
property(path: "mollydb://db/mongodb?key=database.hostname") {
path
key
value
}
}
mutation HookQuery {
propertyRestHook(uri: "http://localhost:3000/properties/mongodb-port", verb: "PUT", path: "mollydb://db/mongodb?key=database.port")
}
mollydb by Iván Corrales Solera <developer@wesovilabs.com>