Code Monkey home page Code Monkey logo

demand-driven-api's Introduction

Build Status

Overview

This is a sample implementation of a Demand Driven API which returns different attributes of Customer as requested in the incoming request. This application explains how graph-ql can be used in a complex multi entity schema; for e.g. in this application we assume that a customer can have multiple accounts, each account could have different attributes / charecterstics etc.

How to Test

This application can be tested using PostMan or its equivalent. It's a Spring Boot application which uses GraphQL Starter project and runs on default port, 8080. Sample request, { customer { firstName accounts { accountNumber cashBalance { availableCash totalCash } mutualFundHoldings { fundIdentifier fundName, unitsHeld } } address { postCode } } }

ToDo

In this application, I have modelled two types of accounts, DematAccount and SavingsAccount, both of which implement Account interface. Ideally, I wanted my DematAccount to implement multiple interfaces, for e.g. DematAccount implements Accounts, SupportsCashBalance, SupportsMutualFunds, SupportsBrokerageAssets etc. etc. This way I wanted to keep the behaviour of an Account flexible so that both of the Accounts (DemantAccount and SavingsAccount) can be modelled independently.

While I could do the object modelling, I could not figure out the right way to create the schema file for this. This is something whihc needs to be worked upon in coming days/weeks.

demand-driven-api's People

Contributors

rsjain1978 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.