gql

package
v0.0.0-...-67a1156 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ComplexityRoot

type ComplexityRoot struct {
	DPool struct {
		Address                      func(childComplexity int) int
		Deposits                     func(childComplexity int) int
		Funders                      func(childComplexity int) int
		Fundings                     func(childComplexity int) int
		ID                           func(childComplexity int) int
		InterestModel                func(childComplexity int) int
		MaxDepositAmount             func(childComplexity int) int
		MaxDepositPeriod             func(childComplexity int) int
		MinDepositAmount             func(childComplexity int) int
		MinDepositPeriod             func(childComplexity int) int
		MoneyMarket                  func(childComplexity int) int
		MoneyMarketIncomeIndex       func(childComplexity int) int
		MphDepositorRewardMultiplier func(childComplexity int) int
		MphFunderRewardMultiplier    func(childComplexity int) int
		MphMintingMultiplier         func(childComplexity int) int
		NumActiveDeposits            func(childComplexity int) int
		NumDeposits                  func(childComplexity int) int
		NumFunders                   func(childComplexity int) int
		NumFundings                  func(childComplexity int) int
		NumUsers                     func(childComplexity int) int
		OneYearInterestRate          func(childComplexity int) int
		OracleInterestRate           func(childComplexity int) int
		Proof                        func(childComplexity int) int
		Stablecoin                   func(childComplexity int) int
		Surplus                      func(childComplexity int) int
		TotalActiveDeposit           func(childComplexity int) int
		TotalHistoricalDeposit       func(childComplexity int) int
		TotalInterestPaid            func(childComplexity int) int
		UnfundedDepositAmount        func(childComplexity int) int
		Users                        func(childComplexity int) int
	}

	DPoolList struct {
		ID             func(childComplexity int) int
		NumActiveUsers func(childComplexity int) int
		NumFunders     func(childComplexity int) int
		NumPools       func(childComplexity int) int
		NumUsers       func(childComplexity int) int
		Pools          func(childComplexity int) int
		Proof          func(childComplexity int) int
	}

	Deposit struct {
		Active                        func(childComplexity int) int
		Amount                        func(childComplexity int) int
		DepositTimestamp              func(childComplexity int) int
		FundingID                     func(childComplexity int) int
		ID                            func(childComplexity int) int
		InitialMoneyMarketIncomeIndex func(childComplexity int) int
		InterestEarned                func(childComplexity int) int
		MaturationTimestamp           func(childComplexity int) int
		MintMPHAmount                 func(childComplexity int) int
		NftID                         func(childComplexity int) int
		Pool                          func(childComplexity int) int
		Proof                         func(childComplexity int) int
		TakeBackMPHAmount             func(childComplexity int) int
		User                          func(childComplexity int) int
	}

	Funder struct {
		Address             func(childComplexity int) int
		Fundings            func(childComplexity int) int
		ID                  func(childComplexity int) int
		NumFundings         func(childComplexity int) int
		NumPools            func(childComplexity int) int
		Pools               func(childComplexity int) int
		Proof               func(childComplexity int) int
		TotalInterestByPool func(childComplexity int) int
		TotalMPHEarned      func(childComplexity int) int
	}

	FunderTotalInterest struct {
		Funder                           func(childComplexity int) int
		ID                               func(childComplexity int) int
		Pool                             func(childComplexity int) int
		Proof                            func(childComplexity int) int
		TotalDeficitFunded               func(childComplexity int) int
		TotalHistoricalDeficitFunded     func(childComplexity int) int
		TotalHistoricalInterestEarned    func(childComplexity int) int
		TotalInterestEarned              func(childComplexity int) int
		TotalRecordedFundedDepositAmount func(childComplexity int) int
	}

	Funding struct {
		Active                         func(childComplexity int) int
		FromDepositID                  func(childComplexity int) int
		FundedDeficitAmount            func(childComplexity int) int
		Funder                         func(childComplexity int) int
		ID                             func(childComplexity int) int
		InitialFundedDepositAmount     func(childComplexity int) int
		MintMPHAmount                  func(childComplexity int) int
		NftID                          func(childComplexity int) int
		Pool                           func(childComplexity int) int
		Proof                          func(childComplexity int) int
		RecordedFundedDepositAmount    func(childComplexity int) int
		RecordedMoneyMarketIncomeIndex func(childComplexity int) int
		ToDepositID                    func(childComplexity int) int
		TotalInterestEarned            func(childComplexity int) int
	}

	Mph struct {
		ID                    func(childComplexity int) int
		Proof                 func(childComplexity int) int
		RewardPerMPHPerSecond func(childComplexity int) int
		RewardPerSecond       func(childComplexity int) int
		TotalHistoricalReward func(childComplexity int) int
		TotalStakedMPHBalance func(childComplexity int) int
		TotalSupply           func(childComplexity int) int
	}

	MPHHolder struct {
		Address               func(childComplexity int) int
		ID                    func(childComplexity int) int
		MphBalance            func(childComplexity int) int
		Proof                 func(childComplexity int) int
		StakedMPHBalance      func(childComplexity int) int
		TotalHistoricalReward func(childComplexity int) int
	}

	Mutation struct {
		UpdateDPool               func(childComplexity int, input models.DPoolInput) int
		UpdateDPoolList           func(childComplexity int, input models.DPoolListInput) int
		UpdateDeposit             func(childComplexity int, input models.DepositInput) int
		UpdateFunder              func(childComplexity int, input models.FunderInput) int
		UpdateFunderTotalInterest func(childComplexity int, input models.FunderTotalInterestInput) int
		UpdateFunding             func(childComplexity int, input models.FundingInput) int
		UpdateMPHHolder           func(childComplexity int, input models.MPHHolderInput) int
		UpdateMph                 func(childComplexity int, input models.MPHInput) int
		UpdateUser                func(childComplexity int, input models.UserInput) int
		UpdateUserTotalDeposit    func(childComplexity int, input models.UserTotalDepositInput) int
	}

	Proof struct {
		Proof func(childComplexity int) int
		Root  func(childComplexity int) int
	}

	Query struct {
		DPool                     func(childComplexity int, id string, prove *bool) int
		DPoolList                 func(childComplexity int, id string, prove *bool) int
		DPoolListSearch           func(childComplexity int, queryText string, prove *bool) int
		DPoolLists                func(childComplexity int, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) int
		DPoolSearch               func(childComplexity int, queryText string, prove *bool) int
		DPools                    func(childComplexity int, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) int
		Deposit                   func(childComplexity int, id string, prove *bool) int
		DepositSearch             func(childComplexity int, queryText string, prove *bool) int
		Deposits                  func(childComplexity int, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) int
		Funder                    func(childComplexity int, id string, prove *bool) int
		FunderSearch              func(childComplexity int, queryText string, prove *bool) int
		FunderTotalInterest       func(childComplexity int, id string, prove *bool) int
		FunderTotalInterestSearch func(childComplexity int, queryText string, prove *bool) int
		FunderTotalInterests      func(childComplexity int, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) int
		Funders                   func(childComplexity int, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) int
		Funding                   func(childComplexity int, id string, prove *bool) int
		FundingSearch             func(childComplexity int, queryText string, prove *bool) int
		Fundings                  func(childComplexity int, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) int
		MPHHolder                 func(childComplexity int, id string, prove *bool) int
		MPHHolderSearch           func(childComplexity int, queryText string, prove *bool) int
		MPHHolders                func(childComplexity int, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) int
		MPHSearch                 func(childComplexity int, queryText string, prove *bool) int
		MPHs                      func(childComplexity int, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) int
		Mph                       func(childComplexity int, id string, prove *bool) int
		User                      func(childComplexity int, id string, prove *bool) int
		UserSearch                func(childComplexity int, queryText string, prove *bool) int
		UserTotalDeposit          func(childComplexity int, id string, prove *bool) int
		UserTotalDepositSearch    func(childComplexity int, queryText string, prove *bool) int
		UserTotalDeposits         func(childComplexity int, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) int
		Users                     func(childComplexity int, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) int
	}

	User struct {
		Address            func(childComplexity int) int
		Deposits           func(childComplexity int) int
		ID                 func(childComplexity int) int
		NumActiveDeposits  func(childComplexity int) int
		NumDeposits        func(childComplexity int) int
		NumPools           func(childComplexity int) int
		Pools              func(childComplexity int) int
		Proof              func(childComplexity int) int
		TotalDepositByPool func(childComplexity int) int
		TotalMPHEarned     func(childComplexity int) int
		TotalMPHPaidBack   func(childComplexity int) int
	}

	UserTotalDeposit struct {
		ID                            func(childComplexity int) int
		Pool                          func(childComplexity int) int
		Proof                         func(childComplexity int) int
		TotalActiveDeposit            func(childComplexity int) int
		TotalHistoricalDeposit        func(childComplexity int) int
		TotalHistoricalInterestEarned func(childComplexity int) int
		TotalInterestEarned           func(childComplexity int) int
		User                          func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DPoolListResolver

type DPoolListResolver interface {
	Pools(ctx context.Context, obj *models.DPoolList) ([]*models.DPool, error)
}

type DPoolResolver

type DPoolResolver interface {
	Users(ctx context.Context, obj *models.DPool) ([]*models.User, error)

	Deposits(ctx context.Context, obj *models.DPool) ([]*models.Deposit, error)

	Funders(ctx context.Context, obj *models.DPool) ([]*models.Funder, error)

	Fundings(ctx context.Context, obj *models.DPool) ([]*models.Funding, error)
}

type DepositResolver

type DepositResolver interface {
	User(ctx context.Context, obj *models.Deposit) (*models.User, error)
	Pool(ctx context.Context, obj *models.Deposit) (*models.DPool, error)
}

type DirectiveRoot

type DirectiveRoot struct {
	HasAuthentication func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
}

type FunderResolver

type FunderResolver interface {
	Pools(ctx context.Context, obj *models.Funder) ([]*models.DPool, error)

	Fundings(ctx context.Context, obj *models.Funder) ([]*models.Funding, error)

	TotalInterestByPool(ctx context.Context, obj *models.Funder) ([]*models.FunderTotalInterest, error)
}

type FunderTotalInterestResolver

type FunderTotalInterestResolver interface {
	Funder(ctx context.Context, obj *models.FunderTotalInterest) (*models.Funder, error)
	Pool(ctx context.Context, obj *models.FunderTotalInterest) (*models.DPool, error)
}

type FundingResolver

type FundingResolver interface {
	Funder(ctx context.Context, obj *models.Funding) (*models.Funder, error)
	Pool(ctx context.Context, obj *models.Funding) (*models.DPool, error)
}

type MutationResolver

type MutationResolver interface {
	UpdateDPoolList(ctx context.Context, input models.DPoolListInput) (*bool, error)
	UpdateDPool(ctx context.Context, input models.DPoolInput) (*bool, error)
	UpdateUser(ctx context.Context, input models.UserInput) (*bool, error)
	UpdateUserTotalDeposit(ctx context.Context, input models.UserTotalDepositInput) (*bool, error)
	UpdateDeposit(ctx context.Context, input models.DepositInput) (*bool, error)
	UpdateFunder(ctx context.Context, input models.FunderInput) (*bool, error)
	UpdateFunderTotalInterest(ctx context.Context, input models.FunderTotalInterestInput) (*bool, error)
	UpdateFunding(ctx context.Context, input models.FundingInput) (*bool, error)
	UpdateMPHHolder(ctx context.Context, input models.MPHHolderInput) (*bool, error)
	UpdateMph(ctx context.Context, input models.MPHInput) (*bool, error)
}

type QueryResolver

type QueryResolver interface {
	DPoolList(ctx context.Context, id string, prove *bool) (*models.DPoolList, error)
	DPoolLists(ctx context.Context, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) ([]*models.DPoolList, error)
	DPoolListSearch(ctx context.Context, queryText string, prove *bool) ([]*models.DPoolList, error)
	DPool(ctx context.Context, id string, prove *bool) (*models.DPool, error)
	DPools(ctx context.Context, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) ([]*models.DPool, error)
	DPoolSearch(ctx context.Context, queryText string, prove *bool) ([]*models.DPool, error)
	User(ctx context.Context, id string, prove *bool) (*models.User, error)
	Users(ctx context.Context, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) ([]*models.User, error)
	UserSearch(ctx context.Context, queryText string, prove *bool) ([]*models.User, error)
	UserTotalDeposit(ctx context.Context, id string, prove *bool) (*models.UserTotalDeposit, error)
	UserTotalDeposits(ctx context.Context, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) ([]*models.UserTotalDeposit, error)
	UserTotalDepositSearch(ctx context.Context, queryText string, prove *bool) ([]*models.UserTotalDeposit, error)
	Deposit(ctx context.Context, id string, prove *bool) (*models.Deposit, error)
	Deposits(ctx context.Context, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) ([]*models.Deposit, error)
	DepositSearch(ctx context.Context, queryText string, prove *bool) ([]*models.Deposit, error)
	Funder(ctx context.Context, id string, prove *bool) (*models.Funder, error)
	Funders(ctx context.Context, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) ([]*models.Funder, error)
	FunderSearch(ctx context.Context, queryText string, prove *bool) ([]*models.Funder, error)
	FunderTotalInterest(ctx context.Context, id string, prove *bool) (*models.FunderTotalInterest, error)
	FunderTotalInterests(ctx context.Context, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) ([]*models.FunderTotalInterest, error)
	FunderTotalInterestSearch(ctx context.Context, queryText string, prove *bool) ([]*models.FunderTotalInterest, error)
	Funding(ctx context.Context, id string, prove *bool) (*models.Funding, error)
	Fundings(ctx context.Context, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) ([]*models.Funding, error)
	FundingSearch(ctx context.Context, queryText string, prove *bool) ([]*models.Funding, error)
	MPHHolder(ctx context.Context, id string, prove *bool) (*models.MPHHolder, error)
	MPHHolders(ctx context.Context, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) ([]*models.MPHHolder, error)
	MPHHolderSearch(ctx context.Context, queryText string, prove *bool) ([]*models.MPHHolder, error)
	Mph(ctx context.Context, id string, prove *bool) (*models.Mph, error)
	MPHs(ctx context.Context, where *string, orderBy *string, asc *bool, first *int, last *int, limit *int, prove *bool) ([]*models.Mph, error)
	MPHSearch(ctx context.Context, queryText string, prove *bool) ([]*models.Mph, error)
}

type ResolverRoot

type ResolverRoot interface {
	DPool() DPoolResolver
	DPoolList() DPoolListResolver
	Deposit() DepositResolver
	Funder() FunderResolver
	FunderTotalInterest() FunderTotalInterestResolver
	Funding() FundingResolver
	Mutation() MutationResolver
	Query() QueryResolver
	User() UserResolver
	UserTotalDeposit() UserTotalDepositResolver
}

type UserResolver

type UserResolver interface {
	Pools(ctx context.Context, obj *models.User) ([]*models.DPool, error)

	Deposits(ctx context.Context, obj *models.User) ([]*models.Deposit, error)

	TotalDepositByPool(ctx context.Context, obj *models.User) ([]*models.UserTotalDeposit, error)
}

type UserTotalDepositResolver

type UserTotalDepositResolver interface {
	User(ctx context.Context, obj *models.UserTotalDeposit) (*models.User, error)
	Pool(ctx context.Context, obj *models.UserTotalDeposit) (*models.DPool, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL