diff --git a/src/schema/assets.ts b/src/schema/assets.ts index c7b92748..4716ad24 100644 --- a/src/schema/assets.ts +++ b/src/schema/assets.ts @@ -15,7 +15,7 @@ export const typeDefs = gql` "Asset's code" code: AssetCode! "All accounts that trust this asset, ordered by balance" - holders(first: Int, last: Int, after: String, before: String): BalanceConnection + balances(first: Int, last: Int, after: String, before: String): BalanceConnection } "Represents single [asset](https://www.stellar.org/developers/guides/concepts/assets.html) on Stellar network with additional statistics, provided by Horizon" @@ -33,7 +33,7 @@ export const typeDefs = gql` "Asset's issuer account flags" flags: AccountFlags "All accounts that trust this asset, ordered by balance" - holders(first: Int, last: Int, after: String, before: String): BalanceConnection + balances(first: Int, last: Int, after: String, before: String): BalanceConnection } "A list of assets" diff --git a/src/schema/resolvers/asset.ts b/src/schema/resolvers/asset.ts index 8e2c6486..b742844f 100644 --- a/src/schema/resolvers/asset.ts +++ b/src/schema/resolvers/asset.ts @@ -14,8 +14,8 @@ const holdersResolver = async (root: Asset, args: any, ctx: IApolloContext, info }; export default { - Asset: { issuer: resolvers.account, holders: holdersResolver }, - AssetWithInfo: { issuer: resolvers.account, holders: holdersResolver }, + Asset: { issuer: resolvers.account, balances: holdersResolver }, + AssetWithInfo: { issuer: resolvers.account, balances: holdersResolver }, Query: { asset: async (root: any, args: { id: AssetID }, ctx: IApolloContext, info: any) => { return AssetFactory.fromId(args.id);