OBJECT

Query

link GraphQL Schema definition

  • type Query {
  • # Login from EWAI-LISTEN or EWAI-MARKET to EWAI-SERVER for authentication.
  • #
  • # Arguments
  • # password: The password from the EWAI-SERVER .env file.
  • # username: The username from the EWAI-SERVER .env file.
  • login(password: String!, username: String!): EwaiAuth!
  • # Returns the list of supported incoming message formats.
  • ewaiAssetIncomingMessageFormats: [NameObject!]
  • # Request a globally unique UUID from EWAI that can then used on a subsequent EWAI
  • # asset create call.
  • ewaiRequestUuid: UuidObject!
  • # Check whether the specified Web3 user address (DID) can create the specified
  • # EWAI asset.
  • #
  • # Arguments
  • # address: The Web3 user address (DID) who is wanting to create
  • # the asset. @example 'did:ethr:0x1234...' or '0x1234'
  • # ewns: The EWNS you want to use for the new EWAI asset. @example
  • # 'solarfarm1.market4.adivate.ewc'
  • ewaiCanCreateAsset(address: String!, ewns: String!): CanCreateResponseObject!
  • # Check whether the specified Web3 user address (DID) has role permission set to
  • # be able to create/publish assets on this EWAI instance/marketplace.
  • #
  • # Arguments
  • # address: The Web3 user address (DID), @example:
  • # 'did:ethr:0x1234...' or '0x1234'
  • ewaiCanPublishAssetsOnMarketplace(
  • address: String
  • ): CanPublishResponseObject!
  • # Get the number of assets in this EWAI Instance.
  • ewaiStats: AssetStats!
  • # Validate a list of externalDIDs against those that are currently in the EWAI
  • # Instance db. This can prevent someone from spamming assets from a marketplace
  • # into this marketplace, in particular, in the case of Ocean Protocol, where all
  • # asset meta-data is stored publicly on-chain.
  • #
  • # Arguments
  • # dids: The list of external DIDs to be checked along with their
  • # base key (which prevents spam). In the case of Ocean Protocol marketplace, these
  • # come from the Ocean Protocol on-chain stored meta-data fields saved when EWAI
  • # created the data asset.
  • ewaiValidateExternalDids(
  • dids: [ValidateExternalDidsArg!]!
  • ): [String!]
  • # Get the list of supported output data formats for asset data calls (data is
  • # servied via REST API endpoint).
  • ewaiAssetOutputDataFormats: [NameObject!]
  • # Get the information for a specified EWAI asset.
  • #
  • # Arguments
  • # where: Specifier of which asset is to be returned.
  • ewaiAsset(where: EwaiAssetWhereUniqueArgs!): EwaiAsset
  • # Get a list of all Ewai assets in this Ewai Instance.
  • #
  • # Arguments
  • # sort: Sort criteria for the returned list.
  • # filter: Criteria used to filter the returned assets list that
  • # match.
  • # skip: # to skip
  • # limit: page size
  • ewaiAssets(
  • sort: EwaiAssetSortArgs,
  • filter: [EwaiAssetFilterArgs!],
  • skip: Int,
  • limit: Int
  • ): [EwaiAsset]
  • # Returns the EWAI Instance name (which is always in EWNS format) and its
  • # configuration settings. This is an unguarded route (the only one in EWAI) since
  • # no sensitive user or asset data is returned, so a marketplace can pull this
  • # information whenever needed. Note that the EWAI-MARKET repo which is built using
  • # GatsbyJS makes use of this call extensively (even at build time in Gatsby
  • # develop) to get configuration settings from EWAI.
  • ewaiInstance: EwaiInstance!
  • }

link Require by

This element is not required by anyone