Skip to content

vino9org/inquiry-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphQL API for account inquiry

Account inquiry engine that exposes GraphQL endpoint for querying data stored in MongoDB

Tech stack:

The project is still in POC stage. Contributions welcome!

Get Started

Checkout the GraphQL Schema. Run the project by ./mvnw clean spring-boot:run, then use browser to navigate to http://localhost:8080/graphiql to use the GraphQL navigator.

Query example:

{
    CasaAccount(accountId: "123") {
            accountId
            balance
            currency
            transactions {
                edges {
                    node {
                        refId
                    }
                }
                pageInfo {
                    hasPreviousPage
                    hasNextPage
                }
            }
    }
}

Result

{
  "data": {
    "CasaAccount": {
      "accountId": "123",
      "balance": 1000,
      "currency": "SGD",
      "transactions": {
        "edges": [
          {
            "node": {
              "refId": "10000001",
              "currency": "SGD",
              "amount": 101
            }
          },
          {
            "node": {
              "refId": "10000002",
              "currency": "SGD",
              "amount": 102
            }
          },
          {
            "node": {
              "refId": "10000003",
              "currency": "SGD",
              "amount": 103
            }
          },
          {
            "node": {
              "refId": "10000004",
              "currency": "SGD",
              "amount": 104
            }
          },
          {
            "node": {
              "refId": "10000005",
              "currency": "SGD",
              "amount": 105
            }
          },
          {
            "node": {
              "refId": "10000006",
              "currency": "SGD",
              "amount": 106
            }
          },
          {
            "node": {
              "refId": "10000007",
              "currency": "SGD",
              "amount": 107
            }
          },
          {
            "node": {
              "refId": "10000008",
              "currency": "SGD",
              "amount": 108
            }
          },
          {
            "node": {
              "refId": "10000009",
              "currency": "SGD",
              "amount": 109
            }
          },
          {
            "node": {
              "refId": "10000010",
              "currency": "SGD",
              "amount": 110
            }
          }
        ],
        "pageInfo": {
          "hasPreviousPage": false,
          "hasNextPage": true,
          "endCursor": "1"
        }
      }
    }
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages