Skip to content

Instantly share code, notes, and snippets.

@ikwattro
Created November 12, 2019 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ikwattro/9d8ab216e4f573ed5f6cc6edd0795e97 to your computer and use it in GitHub Desktop.
Save ikwattro/9d8ab216e4f573ed5f6cc6edd0795e97 to your computer and use it in GitHub Desktop.
CREATE (n:HumeAction)
SET n.id = 'hume_action_person_eco'
SET n.data = '{
  "label": "Show Ecosystem of Person",
  "returnType": "GRAPH",
  "scope": "GLOBAL",
  "id": "hume_action_find_person_eco",
  "inputParameters": [
    {
      "id": "person",
      "label": "Select Person",
      "type": "SELECT_ASYNC",
      "required": true,
      "resolver": {
        "type": "CYPHER",
        "params": {
          "query": "CALL db.index.fulltext.queryNodes(\'Person\', $person + \'*\') YIELD node RETURN id(node) AS id, node.name AS value"
        }
      }
    }
  ],
  "action": {
    "statement": "MATCH p=(person:Person)<-[:MENTIONS_PERSON]-(news)-[:MENTIONS_PERSON]->(other) WHERE id(person) = $person RETURN p"
  }
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment