public BFDQuery(AccountDetailProxy accountDetailProxy, CashFlowProxy cashFlowProxy, CustomerProxy customerProxy) { Name = "Query"; Description = "....."; Field <ListGraphType <CashFlowType> >( "CashFlow", resolve: context => cashFlowProxy.GetCashFlowDetails()); Field <ListGraphType <AccountBalanceType> >( "AccountBalance", resolve: context => accountDetailProxy.GetAccountBalances()); Field <ListGraphType <CustomerType> >( "Customer", resolve: context => customerProxy.GetCustomerList()); Field <CustomerType>( "GetCustomerByCustomerId", arguments: new QueryArguments( new QueryArgument <NonNullGraphType <IntGraphType> > { Name = "customerId" } ), resolve: context => { var customerId = context.GetArgument <int>("customerId"); return(customerProxy.GetCustomerById(customerId)); }); }
public CashFlowService(CashFlowProxy cashFlowProxy) { _cashFlowProxy = cashFlowProxy; }
public GraphQLController(AccountDetailProxy accountDetailProxy, CashFlowProxy cashFlowProxy, CustomerProxy customerProxy) { _accountDetailsProxy = accountDetailProxy; _cashFlowProxy = cashFlowProxy; _customerProxy = customerProxy; }