GithubHelp home page GithubHelp logo

trabian / banking-api Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 2.67 MB

A set of packages for interacting with and mocking financial services.

JavaScript 85.62% HTML 2.25% Dockerfile 0.61% TypeScript 11.51%

banking-api's People

Contributors

davidharting avatar stevegula avatar trabianmatt avatar treeme avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

banking-api's Issues

Change "Relationship" to "Customer"

The idea of "Relationship" seems to be a bit too abstract and leads to confusion as most of the APIs we're integrating use the concept of "Customer" and we find ourselves mapping those two conceptually.

Instead of using:

query AccountQuery {
  me {
    relationship {
      accounts {
        id
      }
    }
  }
}

We'll use:

query AccountQuery {
  me {
    customer {
      accounts {
        id
      }
    }
  }
}

Note that we're still keeping the distinction between "me" (as the current user) and "customer" (me in my role as a user). This is still an open area for conversation but we'll try this version first.

We still need to handle the idea of "Top Level Accounts" that we've encountered at FIs (particularly credit unions), where they'll have a structure like:

  • User
    • Account 1234
      • Subaccount 123401 (Savings account)
      • Subaccount 123402 (Checking account)
    • Account 4321
      • Subaccount 432101 (Savings account)
      • Subaccount 432105 (Loan account)

In a previous project we mapped these conceptually to:

  • User
    • Top Level Account 1234 (or "Account Group")
      • Account 123401
      • Account 123402
    • Top Level Account 4321
      • Account 432101
      • Account 432105

While most users only have one account and would thus be well served by a "Customer" that maps to a "Top Level Account", we can handle the multi-top-level-account scenario using an optional id parameter passed to the customer query:

query AccountQuery {  
  me {
    customer {
      accounts {
        id
      }
    }
  }
}

query OtherAccountQuery {  
  me {
    customer(id: "1234") {
      accounts {
        id
      }
    }
  }
}

Notes

  • While we'd typically maintain but deprecate the existing "Relationship"-related types, we're currently only using it in a single unreleased project and will update that project to use the new "Customer" type.
  • Despite the above, we should still bump the minor version of the package.

Update mutation naming to be nounVerb instead of verbNoun

This was mentioned in a GraphQL design tutorial that Shopify put out and makes sense to me:

First a quick note on naming: you'll notice that we named all of our mutations in the form collection rather than the more naturally-English Collection. Unfortunately, GraphQL does not provide a method for grouping or otherwise organizing mutations, so we are forced into alphabetization as a workaround. Putting the core type first ensures that all of the related mutations group together in the final list.

Rule #17: Prefix mutation names with the object they are mutating for alphabetical grouping (e.g. use orderCancel instead of cancelOrder).

Let's update the mutation names within this project, both the schemas within graphql-types and in the packages leveraging those schemas (a find-and-replace should work).

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.