Documentation ¶
Index ¶
- func AddGraphQLError(ctx context.Context, err error)
- func ErrorPresenter(ctx context.Context, e error) *gqlerror.Error
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- func Recover(ctx context.Context, err interface{}) error
- type ComplexityRoot
- type Config
- type DirectiveRoot
- type MutationResolver
- type QueryResolver
- type ResolverRoot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddGraphQLError ¶
AddGraphQLError unwraps an error to find a wrapped HTTP error and populate it in the GraphQL response.
func ErrorPresenter ¶
ErrorPresenter captures errors returned from resolvers and formats them.
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct { Account struct { AuthRoles func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.AuthRoleOrder, where *ent.AuthRoleWhereInput) int AuthType func(childComplexity int) int Connections func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.ConnectionOrder) int CreatedAt func(childComplexity int) int DeletedAt func(childComplexity int) int Email func(childComplexity int) int EmailConfirmed func(childComplexity int) int Friends func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.AccountOrder, where *ent.AccountWhereInput) int ID func(childComplexity int) int Nickname func(childComplexity int) int PasswordUpdatedAt func(childComplexity int) int Portfolios func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.PortfolioOrder, where *ent.PortfolioWhereInput) int ProfilePictureURL func(childComplexity int) int UpdatedAt func(childComplexity int) int } AccountConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } AccountEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Asset struct { AssetClass func(childComplexity int) int CreatedAt func(childComplexity int) int Cryptocurrency func(childComplexity int) int DailyAssetPrices func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.DailyAssetPriceOrder) int DeletedAt func(childComplexity int) int ID func(childComplexity int) int UpdatedAt func(childComplexity int) int } AssetClass struct { CreatedAt func(childComplexity int) int DeletedAt func(childComplexity int) int Description func(childComplexity int) int ID func(childComplexity int) int UpdatedAt func(childComplexity int) int Value func(childComplexity int) int } AssetClassConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } AssetClassEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } AssetConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } AssetEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } AuthRole struct { Accounts func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.AccountOrder) int CreatedAt func(childComplexity int) int DeletedAt func(childComplexity int) int Description func(childComplexity int) int ID func(childComplexity int) int StaffAccounts func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.StaffAccountOrder) int UpdatedAt func(childComplexity int) int Value func(childComplexity int) int } AuthRoleConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } AuthRoleEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } AuthType struct { CreatedAt func(childComplexity int) int DeletedAt func(childComplexity int) int Description func(childComplexity int) int ID func(childComplexity int) int UpdatedAt func(childComplexity int) int Value func(childComplexity int) int } AuthTypeConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } AuthTypeEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Blockchain struct { ChainID func(childComplexity int) int CreatedAt func(childComplexity int) int Cryptocurrencies func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.CryptocurrencyOrder) int DeletedAt func(childComplexity int) int ID func(childComplexity int) int Icon func(childComplexity int) int Name func(childComplexity int) int Symbol func(childComplexity int) int Transactions func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.TransactionOrder) int UpdatedAt func(childComplexity int) int } BlockchainConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } BlockchainEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Connection struct { AccessToken func(childComplexity int) int Account func(childComplexity int) int AccountID func(childComplexity int) int CreatedAt func(childComplexity int) int DeletedAt func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Portfolios func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.PortfolioOrder) int RefreshToken func(childComplexity int) int Source func(childComplexity int) int SourceID func(childComplexity int) int UpdatedAt func(childComplexity int) int } ConnectionConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } ConnectionEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } CreateAccountPayload struct { Account func(childComplexity int) int Session func(childComplexity int) int } CreateStaffAccountPayload struct { Session func(childComplexity int) int StaffAccount func(childComplexity int) int } Cryptocurrency struct { Asset func(childComplexity int) int AssetID func(childComplexity int) int Blockchains func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.BlockchainOrder, where *ent.BlockchainWhereInput) int CreatedAt func(childComplexity int) int DeletedAt func(childComplexity int) int ID func(childComplexity int) int Icon func(childComplexity int) int Name func(childComplexity int) int Symbol func(childComplexity int) int UpdatedAt func(childComplexity int) int } CryptocurrencyConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } CryptocurrencyEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } DailyAssetPrice struct { AdjustedClose func(childComplexity int) int Asset func(childComplexity int) int AssetID func(childComplexity int) int Close func(childComplexity int) int CreatedAt func(childComplexity int) int DeletedAt func(childComplexity int) int High func(childComplexity int) int ID func(childComplexity int) int Low func(childComplexity int) int Open func(childComplexity int) int Time func(childComplexity int) int UpdatedAt func(childComplexity int) int } DailyAssetPriceConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } DailyAssetPriceEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Exchange struct { CreatedAt func(childComplexity int) int DeletedAt func(childComplexity int) int ID func(childComplexity int) int Icon func(childComplexity int) int Name func(childComplexity int) int Transactions func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.TransactionOrder, where *ent.TransactionWhereInput) int URL func(childComplexity int) int UpdatedAt func(childComplexity int) int } ExchangeConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } ExchangeEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } LoginToAccountPayload struct { Account func(childComplexity int) int Session func(childComplexity int) int } LoginToStaffAccountPayload struct { Session func(childComplexity int) int StaffAccount func(childComplexity int) int } Mutation struct { CreateAccount func(childComplexity int, input ent.CreateAccountInput) int CreateConnection func(childComplexity int, input ent.CreateConnectionInput) int CreatePortfolio func(childComplexity int, input ent.CreatePortfolioInput) int CreateStaffAccount func(childComplexity int, input ent.CreateStaffAccountInput) int LoginToAccount func(childComplexity int, input auth.LoginToAccountInput) int LoginToStaffAccount func(childComplexity int, input auth.LoginToStaffAccountInput) int Logout func(childComplexity int) int UpdateConnection func(childComplexity int, id pulid.PULID, input ent.UpdateConnectionInput) int UpdatePortfolio func(childComplexity int, id pulid.PULID, input ent.UpdatePortfolioInput) int } PageInfo struct { EndCursor func(childComplexity int) int HasNextPage func(childComplexity int) int HasPreviousPage func(childComplexity int) int StartCursor func(childComplexity int) int } Portfolio struct { Account func(childComplexity int) int AccountID func(childComplexity int) int Connections func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.ConnectionOrder, where *ent.ConnectionWhereInput) int CreatedAt func(childComplexity int) int DeletedAt func(childComplexity int) int ID func(childComplexity int) int IsPublic func(childComplexity int) int IsVisible func(childComplexity int) int Name func(childComplexity int) int Transactions func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.TransactionOrder) int UpdatedAt func(childComplexity int) int } PortfolioConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } PortfolioEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Query struct { Accounts func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.AccountOrder, where *ent.AccountWhereInput) int AssetClasses func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.AssetClassOrder, where *ent.AssetClassWhereInput) int Assets func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.AssetOrder, where *ent.AssetWhereInput) int AuthRoles func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.AuthRoleOrder, where *ent.AuthRoleWhereInput) int AuthTypes func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.AuthTypeOrder, where *ent.AuthTypeWhereInput) int Blockchains func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.BlockchainOrder, where *ent.BlockchainWhereInput) int Connections func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.ConnectionOrder, where *ent.ConnectionWhereInput) int Cryptocurrencies func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.CryptocurrencyOrder, where *ent.CryptocurrencyWhereInput) int DailyAssetPrices func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.DailyAssetPriceOrder, where *ent.DailyAssetPriceWhereInput) int Exchanges func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.ExchangeOrder, where *ent.ExchangeWhereInput) int Node func(childComplexity int, id pulid.PULID) int Nodes func(childComplexity int, ids []pulid.PULID) int Portfolios func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.PortfolioOrder, where *ent.PortfolioWhereInput) int SourceTypes func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.SourceTypeOrder, where *ent.SourceTypeWhereInput) int Sources func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.SourceOrder, where *ent.SourceWhereInput) int StaffAccounts func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.StaffAccountOrder, where *ent.StaffAccountWhereInput) int TransactionTypes func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.TransactionTypeOrder, where *ent.TransactionTypeWhereInput) int Transactions func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.TransactionOrder, where *ent.TransactionWhereInput) int } Session struct { AuthRoles func(childComplexity int) int Token func(childComplexity int) int UserID func(childComplexity int) int } Source struct { Connections func(childComplexity int) int CreatedAt func(childComplexity int) int DeletedAt func(childComplexity int) int ID func(childComplexity int) int Icon func(childComplexity int) int Name func(childComplexity int) int SourceType func(childComplexity int) int UpdatedAt func(childComplexity int) int } SourceConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } SourceEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } SourceType struct { CreatedAt func(childComplexity int) int DeletedAt func(childComplexity int) int Description func(childComplexity int) int ID func(childComplexity int) int Sources func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.SourceOrder) int UpdatedAt func(childComplexity int) int Value func(childComplexity int) int } SourceTypeConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } SourceTypeEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } StaffAccount struct { AuthRoles func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.AuthRoleOrder, where *ent.AuthRoleWhereInput) int AuthType func(childComplexity int) int CreatedAt func(childComplexity int) int DeletedAt func(childComplexity int) int Email func(childComplexity int) int EmailConfirmed func(childComplexity int) int ID func(childComplexity int) int Nickname func(childComplexity int) int PasswordUpdatedAt func(childComplexity int) int UpdatedAt func(childComplexity int) int } StaffAccountConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } StaffAccountEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Transaction struct { BaseAsset func(childComplexity int) int BaseAssetID func(childComplexity int) int Blockchain func(childComplexity int) int BlockchainID func(childComplexity int) int CreatedAt func(childComplexity int) int DeletedAt func(childComplexity int) int Exchange func(childComplexity int) int ExchangeID func(childComplexity int) int ID func(childComplexity int) int Portfolio func(childComplexity int) int PortfolioID func(childComplexity int) int PricePerUnit func(childComplexity int) int QuoteAsset func(childComplexity int) int QuoteAssetID func(childComplexity int) int Time func(childComplexity int) int TransactionType func(childComplexity int) int Units func(childComplexity int) int UpdatedAt func(childComplexity int) int } TransactionConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } TransactionEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } TransactionType struct { CreatedAt func(childComplexity int) int DeletedAt func(childComplexity int) int Description func(childComplexity int) int ID func(childComplexity int) int UpdatedAt func(childComplexity int) int Value func(childComplexity int) int } TransactionTypeConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } TransactionTypeEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type MutationResolver ¶
type MutationResolver interface { CreateAccount(ctx context.Context, input ent.CreateAccountInput) (*auth.CreateAccountPayload, error) CreateStaffAccount(ctx context.Context, input ent.CreateStaffAccountInput) (*auth.CreateStaffAccountPayload, error) LoginToAccount(ctx context.Context, input auth.LoginToAccountInput) (*auth.LoginToAccountPayload, error) LoginToStaffAccount(ctx context.Context, input auth.LoginToStaffAccountInput) (*auth.LoginToStaffAccountPayload, error) Logout(ctx context.Context) (*model.Void, error) CreateConnection(ctx context.Context, input ent.CreateConnectionInput) (*ent.Connection, error) UpdateConnection(ctx context.Context, id pulid.PULID, input ent.UpdateConnectionInput) (*ent.Connection, error) CreatePortfolio(ctx context.Context, input ent.CreatePortfolioInput) (*ent.Portfolio, error) UpdatePortfolio(ctx context.Context, id pulid.PULID, input ent.UpdatePortfolioInput) (*ent.Portfolio, error) }
type QueryResolver ¶
type QueryResolver interface { Node(ctx context.Context, id pulid.PULID) (ent.Noder, error) Nodes(ctx context.Context, ids []pulid.PULID) ([]ent.Noder, error) Accounts(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.AccountOrder, where *ent.AccountWhereInput) (*ent.AccountConnection, error) Assets(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.AssetOrder, where *ent.AssetWhereInput) (*ent.AssetConnection, error) AssetClasses(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.AssetClassOrder, where *ent.AssetClassWhereInput) (*ent.AssetClassConnection, error) AuthRoles(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.AuthRoleOrder, where *ent.AuthRoleWhereInput) (*ent.AuthRoleConnection, error) AuthTypes(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.AuthTypeOrder, where *ent.AuthTypeWhereInput) (*ent.AuthTypeConnection, error) Blockchains(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.BlockchainOrder, where *ent.BlockchainWhereInput) (*ent.BlockchainConnection, error) Connections(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.ConnectionOrder, where *ent.ConnectionWhereInput) (*ent.ConnectionConnection, error) Cryptocurrencies(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.CryptocurrencyOrder, where *ent.CryptocurrencyWhereInput) (*ent.CryptocurrencyConnection, error) DailyAssetPrices(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.DailyAssetPriceOrder, where *ent.DailyAssetPriceWhereInput) (*ent.DailyAssetPriceConnection, error) Exchanges(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.ExchangeOrder, where *ent.ExchangeWhereInput) (*ent.ExchangeConnection, error) Portfolios(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.PortfolioOrder, where *ent.PortfolioWhereInput) (*ent.PortfolioConnection, error) Sources(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.SourceOrder, where *ent.SourceWhereInput) (*ent.SourceConnection, error) SourceTypes(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.SourceTypeOrder, where *ent.SourceTypeWhereInput) (*ent.SourceTypeConnection, error) StaffAccounts(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.StaffAccountOrder, where *ent.StaffAccountWhereInput) (*ent.StaffAccountConnection, error) Transactions(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.TransactionOrder, where *ent.TransactionWhereInput) (*ent.TransactionConnection, error) TransactionTypes(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.TransactionTypeOrder, where *ent.TransactionTypeWhereInput) (*ent.TransactionTypeConnection, error) }
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.