Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add GraphQL API for decisions and DRGs #340

Merged
merged 5 commits into from
Feb 28, 2023
Merged

Conversation

saig0
Copy link
Contributor

@saig0 saig0 commented Feb 28, 2023

Description

Import decisions and DRGs from Hazelcast and expose them via the GraphQL API.


Query decisions:

decisions {
    totalCount
    nodes {
      key
      decisionId
      decisionName
      version
      decisionRequirements {
        key
      }
    }
  }

Response:

{
  "data": {
    "decisions": {
      "totalCount": 1,
      "nodes": [
        {
          "key": "2251799813685251",
          "decisionId": "department_line_manager",
          "decisionName": "Department line manager",
          "version": 1,
          "decisionRequirements": {
            "key": "2251799813685250"
          }
        }
      ]
    }
  }
}

Query decision requirements:

decisionRequirements {
    totalCount
    nodes {
      key
      decisionRequirementsId
      decisionRequirementsName
      version
      namespace
      deployTime
      dmnXML
      decisions {
        key
        decisionId
      }
    }
  }

Response:

{
  "data": {
    "decisionRequirements": {
      "totalCount": 1,
      "nodes": [
        {
          "key": "2251799813685250",
          "decisionRequirementsId": "Definitions_0n4vu4o",
          "decisionRequirementsName": "DRD",
          "version": 1,
          "namespace": "http://camunda.org/schema/1.0/dmn",
          "deployTime": "2023-02-28T07:22:52.929Z",
          "dmnXML": "..."
          "decisions": [
            {
              "key": "2251799813685251",
              "decisionId": "department_line_manager"
            }
          ]
        }
      ]
    }
  }
}

Subscribe to decision updates:

subscription {
  decisionUpdates {
    key
    decisionId
    decisionName
  }
}

Response message:

{
  "data": {
    "decisionUpdates": {
      "key": "2251799813685251",
      "decisionId": "department_line_manager",
      "decisionName": "Department line manager"
    }
  }
}

Close #285

@saig0 saig0 merged commit 1f6e5b6 into main Feb 28, 2023
@saig0 saig0 deleted the 285-import-decisions branch February 28, 2023 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I can query decisions and decision requirements
1 participant