Schema Definition
GraphQL Query, Mutation, and Subscription endpoints schema.
# Root schema definition
schema {
query: Query
mutation: Mutation
subscription: Subscription
}
# Entry points for querying the API
type Query {
# version represents the API server version responding to your requests.
version: String!
# Get primary used Artion contracts addresses.
contracts: Contracts!
# Get list of token collections categories.
categories: [Category!]!
# Get collection by address.
collection(contract: Address!): Collection
# List collections (all, search name or filter mintable by given user).
collections(search: String, mintableBy: Address, first: Int, after: Cursor, last: Int, before: Cursor): CollectionConnection!
# Get token by address and id.
token(contract: Address!, tokenId: BigInt!): Token
# List all tokens (with defined filter and sorting).
tokens(filter: TokenFilter, sortBy: TokenSorting, sortDir: SortingDirection, first: Int, after: Cursor, last: Int, before: Cursor): TokenConnection!
# List of tokens supported for payments on the marketplace.
payTokens: [PayToken!]!
# Get user by address.
user(address: Address!): User!
# List or search users
users(search: String, first: Int, after: Cursor, last: Int, before: Cursor): UserConnection!
# randomTrade resolves a Random ERC-721 NFT Trade by address.
randomTrade(contract: Address!): RandomTrade
# Get user authenticated using bearer token.
loggedUser: User
# Get currently set shipping address for tokens redeem.
loggedUserShippingAddress: ShippingAddress
# Get notification settings of logged user.
notificationSettings: NotificationSettings
# Get un-lockable content attached to a NFT token (only token owner).
unlockableContent(contract: Address!, tokenId: BigInt!): String
# Estimate platform fee and gas needed for token minting.
estimateMintFeeGas(user: Address!, contract: Address!, tokenUri: String!): MintFeeGas!
# Check if the operator has ApprovedForAll permission to manipulate with tokens of given owner.
isApprovedForAll(contract: Address!, owner: Address!, operator: Address!): Boolean!
# Search collections, tokens, and users for the given phrase and return list of relevant results.
textSearch(phrase: String!, maxLength: Int = 15): [TextSearchEdge]!
# Check it the logged user is a moderator.
isLoggedModerator: Boolean!
# List collections to be reviewed by a moderator. (moderators only)
collectionsInReview(search: String, first: Int, after: Cursor, last: Int, before: Cursor): CollectionConnection!
# List collections which was banned by a moderator. (moderators only)
bannedCollections(search: String, first: Int, after: Cursor, last: Int, before: Cursor): CollectionConnection!
# List tokens which was banned by a moderator. (moderators only)
bannedTokens(first: Int, after: Cursor, last: Int, before: Cursor): BannedNftConnection!
}
# Mutation endpoints for modifying the data
type Mutation {
# Generate login challenge to be signed by private key and used to log-in
initiateLogin: String!
# Use private key signed login challenge to get bearer token.
login(user: Address!, challenge: String!, signature: String!): String!
# Update user profile of logged user
updateUser(username: String, bio: String, email: String!): Boolean!
# Update notification settings of logged user
updateNotificationSettings(settings: InputNotificationSettings!): Boolean!
# Add token into favourite tokens of logged user.
likeToken(contract: Address!, tokenId: BigInt!): Boolean!
# Remove token from favourite tokens of logged user.
unlikeToken(contract: Address!, tokenId: BigInt!): Boolean!
# Add user into users followed by the logged user.
followUser(user: Address!): Boolean!
# Remove user from users followed by the logged user.
unfollowUser(user: Address!): Boolean!
# Update shipping address for tokens redeem.
updateShippingAddress(address: InputShippingAddress!): Boolean!
# Set unlockable content attached to a NFT token (only token owner and only once)
setUnlockableContent(contract: Address!, tokenId: BigInt!, content: String!): Boolean!
# Increment amount of views of the token.
incrementTokenViews(contract: Address!, tokenId: BigInt!): Boolean!
# Approve the in-review collection (moderators only)
approveCollection(contract: Address!): Boolean!
# Decline the in-review collection (moderators only)
declineCollection(contract: Address!): Boolean!
# Ban the collection (moderators only)
banCollection(contract: Address!): Boolean!
# Unban the collection (moderators only)
unbanCollection(contract: Address!): Boolean!
# Ban the token (moderators only)
banToken(contract: Address!, tokenId: BigInt!): Boolean!
# Unban the token (moderators only)
unbanToken(contract: Address!, tokenId: BigInt!): Boolean!
}
type Subscription {
# Subscribe events relevant for given user (owned auction bid, etc.)
watchUserEvents(user: Address!): Event!
# Subscribe auction events
watchAuction(contract: Address!, tokenId: BigInt!): Event!
}
Last updated