query/modules/listings.ListingsQueryModule Module for querying listing data from The Graph

Table of contents

Methods

constructor

new ListingsQueryModule(queryClient): ListingsQueryModule

Parameters

NameType
queryClientQueryClient

Returns

ListingsQueryModule

Methods

getAll

getAll(first?, skip?): Promise<ListingsResponse> Get all listings without any filters

Parameters

NameTypeDefault valueDescription
firstnumber100Number of items to fetch (default: 100)
skipnumber0Number of items to skip (default: 0)

Returns

Promise<ListingsResponse> Response with listings and pagination info

getListings

getListings(params?, filters?): Promise<ListingsResponse> Get a list of listings based on filtering and pagination parameters

Parameters

NameTypeDescription
paramsPaginationParamsPagination parameters
filtersListingFiltersFiltering options

Returns

Promise<ListingsResponse> List of listings with pagination info

getListingById

getListingById(id): Promise<null | ListingObject> Get a single listing by its ID

Parameters

NameTypeDescription
idstringThe listing ID (can be blockchain ID or graph entity ID)

Returns

Promise<null | ListingObject> The listing or null if not found

getListingsByLicensor

getListingsByLicensor(licensorAddress, params?): Promise<ListingsResponse> Get all listings from a specific licensor

Parameters

NameTypeDescription
licensorAddress`0x${string}`Licensor’s address
paramsPaginationParamsPagination parameters

Returns

Promise<ListingsResponse> List of listings with pagination info

getActiveListings

getActiveListings(params?): Promise<ListingsResponse> Get all active listings

Parameters

NameTypeDescription
paramsPaginationParamsPagination parameters

Returns

Promise<ListingsResponse> List of active listings with pagination info