Implementation using Spring framework includes following features :
- HTTP Basic Authentication
- Pagination -Offset based pagination pattern
- JSON response based on client side field request GraphQL
Class Diagram and sequence diagram for Transaction Report Inquiry Services
$ git clone https://github.com/azizasm/transaction-report-service.git
$ mvn clean package
$ java -jar target/transaction-report-services-0.0.1-SNAPSHOT.jar
Open http://localhost:8080/graphiql
-
Or manual run :
$ docker run -p 8080:8080 -t azizasm/image-trs:part1
User name/pass : user/pass
Sample GraphQL query :
query AllAccounts {
accounts {
id
accountnum
acctype
}
}
query allLinks {
allLinks(skip: 1, first: 10) {
accountnum
acctype
}
}
query AllTransactions {
transactions {
id
trxdate
amount
accnt {
id
accountnum
acctype
}
}
}
query AllRemarks {
remarks {
id
text
accnt {
id
accountnum
acctype
}
}
}
query Transaction($transactionId: Int!) {
transaction(id: $transactionId) {
id
trxdate
amount
accnt {
id
accountnum
acctype
}
remarks {
id
text
}
}
}
{"transactionId": 2}