Skip to content

Instantly share code, notes, and snippets.

@juancampa
Last active July 4, 2018 03:09
Show Gist options
  • Save juancampa/bacc417a09f6825f631f3a0e7c318bd1 to your computer and use it in GitHub Desktop.
Save juancampa/bacc417a09f6825f631f3a0e7c318bd1 to your computer and use it in GitHub Desktop.
Example of a Membrane query from the CLI
$ membrane query
'github:users.one(name:"facebook").repos.one(name:"react")'
'{
issues {
page {
items {
state
comments
self
}
}
}
}'
OUTPUT:
{
"issues": {
"page": {
"items": [
{
"state": "open",
"comments": 1,
"self": {
"$ref": "github:users.one(name:\"facebook\").repos.one(name:\"react\").issues.one(number:13145)"
}
},
{
"state": "open",
"comments": 0,
"self": {
"$ref": "github:users.one(name:\"facebook\").repos.one(name:\"react\").issues.one(number:13142)"
}
},
(...)
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment