Skip to content

maksim-tolo/dragonereum-subgraph

Repository files navigation

Integration Progress

  • GOLD marketplace page
  • Leaderboard page
  • My Dragons page
  • My Eggs page
  • Dragon Details page
  • Egg Details page
  • Dragons for sale page
  • Eggs for sale page
  • Dragons for breeding page
  • Services page
  • Battle details page
  • Start battle page
  • Conducted battles page
  • Conducted gladiator battles page
  • Gladiator battle details page
  • Notifications

Queries

Get eggs for sale

query Auctions($first: Int!, $skip: Int!) {
  auctions(first: $first, skip: $skip, where: { status: active, type: eggSale }) {
    currency
    startPrice
    endPrice
    period
    created
    egg {
      id
      generation
      coolness
      momDragonTypes
      dadDragonTypes
    }
  }
}

Get dragons for sale

query Auctions($first: Int!, $skip: Int!) {
  auctions(first: $first, skip: $skip, where: { status: active, type: dragonSale }) {
    currency
    startPrice
    endPrice
    period
    created
    dragon {
      id
      name
      types
      coolness
      level
      generation
      skills {
        attack
        defense
        stamina
        speed
        intelligence
      }
    }
  }
}

Get dragons for breeding

query Auction($first: Int!, $skip: Int!) {
  auctions(first: $first, skip: $skip, where: { status: active, type: dragonBreeding }) {
    currency
    startPrice
    endPrice
    period
    created
    dragon {
      id
      name
      types
      coolness
      level
      generation
      skills {
        attack
        defense
        stamina
        speed
        intelligence
      }
    }
  }
}

Get gold selling orders

query GoldAuctions($first: Int!, $skip: Int!) {
  goldAuctions(first: $first, skip: $skip, where: { status: active, type: sell }, orderBy: price, orderDirection: asc) {
    id
    seller {
      id
    }
    price
    amount
    created
  }
}

Get gold buying orders

query GoldAuctions($first: Int!, $skip: Int!) {
  goldAuctions(first: $first, skip: $skip, where: { status: active, type: buy }, orderBy: price, orderDirection: desc) {
    id
    seller {
      id
    }
    price
    amount
    created
  }
}

Get gold selling history

query GoldAuctions($first: Int!, $skip: Int!) {
  goldAuctions(first: $first, skip: $skip, where: { status: fulfilled, type: sell }, orderBy: ended, orderDirection: desc) {
    price
    purchaseAmount
    ended
    txHash
  }
}

Get gold buying history

query GoldAuctions($first: Int!, $skip: Int!) {
  goldAuctions(first: $first, skip: $skip, where: { status: fulfilled, type: buy }, orderBy: ended, orderDirection: desc) {
    price
    purchaseAmount
    ended
    txHash
  }
}

Get dragon details

query Dragon($id: ID!) {
  dragon(id: $id) {
    id
    owner {
      id
      name
    }
    types
    genome
    skills {
      attack
      defense
      stamina
      speed
      intelligence
    }
    birthDay
    generation
    experience
    dnaPoints
    coolness
    isBreedingAllowed
    level
    tactics {
      attack
      melee
    }
    auction {
      currency
      startPrice
      endPrice
      period
      created
      type
    }
    name
    parents {
      id
      types
      genome
    }
    dragonsChildren {
      id
      types
      genome
    }
    eggsChildren {
      id
      isHatched
      momDragonTypes
      dadDragonTypes
    }
    healthAndMana {
      remainingHealth
      remainingMana
      maxHealth
      maxMana
      timestamp
    }
    battlesStat {
      wins
      defeats
    }
    specialAttack {
      dragonType
      cost
      factor
      chance
    }
    specialDefense {
      dragonType
      cost
      factor
      chance
    }
    specialPeacefulSkill {
      skillClass
      cost
      effect
      usageDate
      price
    }
    buffs
    strength
  }
}

Get egg details

query Egg($id: ID!) {
  egg(id: $id) {
    id
    owner {
      id
      name
    }
    birthDay
    isInNest
    nestPlacementDate
    isHatched
    auction {
      currency
      startPrice
      endPrice
      period
      created
      type
    }
    generation
    coolness
    parents {
      id
      types
      genome
    }
    momDragonTypes
    dadDragonTypes
  }
  eggs(where: { isInNest: true }, orderBy: nestPlacementDate, orderDirection: asc) {
    id
  }
}

Get dragons sorted by coolness

query Dragons($first: Int!, $skip: Int!) {
  dragons(first: $first, skip: $skip, orderBy: coolness, orderDirection: desc) {
    id
    types
    genome
    birthDay
    generation
    coolness
    level
    auction {
      currency
      startPrice
      endPrice
      period
      created
      type
    }
    name
    owner {
      id
    }
  }
}

Get peaceful skills for sale

query DragonSpecialPeacefulSkills($first: Int!, $skip: Int!) {
  dragonSpecialPeacefulSkills(first: $first, skip: $skip, where: { price_not: null }, orderBy: usageDate) {
    skillClass
    cost
    effect
    usageDate
    price
    dragon {
      id
      types
      genome
      name
      owner {
        id
        name
      }
      healthAndMana {
        remainingHealth
        remainingMana
        maxHealth
        maxMana
        timestamp
      }
    }
  }
}

Releases

No releases published

Packages

No packages published