Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: introduce "avatar" query #101

Merged
merged 11 commits into from
May 30, 2024
Merged

feat: introduce "avatar" query #101

merged 11 commits into from
May 30, 2024

Conversation

boscohyun
Copy link
Contributor

  • Replace some Lib9c.GraphQL types to Mimir.
  • Refactor PlanetNameEnumType.
  • Remove "inventory" query.
  • Introduce "avatar" query with "inventory" inside.

Example

query (
    $planetName: PlanetName! = ODIN,
    $avatarAddress: Address! = "4D5E42553f35c711f4f07757cf73A97a2F69E69c") {
    avatar(planetName: $planetName, address: $avatarAddress)
    {
        agentAddress
        name
        level
        actionPoint
        inventory
        {
            consumables
            {
                itemSheetId
                nonFungibleId
            }
            costumes
            {
                itemSheetId
                nonFungibleId
            }
            equipments
            {
                itemSheetId
                grade
                itemType
                itemSubType
                elementalType
                nonFungibleId
            }
            materials
            {
                itemSheetId
                count
            }
        }
    }
}
{
  "data": {
    "avatar": {
      "agentAddress": "0xCEB5910a777394a809516D34fEc6f964461413EF",
      "name": "Vall7777",
      "level": 266,
      "actionPoint": 0,
      "inventory": {
        "consumables": [
          {
            "itemSheetId": 900109,
            "nonFungibleId": "e814cf3c-c3c5-41ed-ae1f-29e12163cac7"
          },
          {
            "itemSheetId": 900109,
            "nonFungibleId": "f6468bf3-628f-40d3-ac7b-02a9568db23c"
          },
          ...
        ],
        "costumes": [
          {
            "itemSheetId": 40100015,
            "nonFungibleId": "650786db-550f-4145-b1e7-04d760018db9"
          }
        ],
        "equipments": [
          {
            "itemSheetId": 10144000,
            "grade": 4,
            "itemType": "EQUIPMENT",
            "itemSubType": "WEAPON",
            "elementalType": "WIND",
            "nonFungibleId": "aa5c71d1-372a-490d-834a-05c750fe483c"
          },
          {
            "itemSheetId": 10241000,
            "grade": 4,
            "itemType": "EQUIPMENT",
            "itemSubType": "ARMOR",
            "elementalType": "FIRE",
            "nonFungibleId": "d54ee99a-4356-480b-90e9-cf75be4f536d"
          },
          ...
        ],
        "materials": [
          {
            "itemSheetId": 302011,
            "count": 617
          },
          {
            "itemSheetId": 700702,
            "count": 67
          },
          ...
        ]
      }
    }
  }
}

@boscohyun boscohyun requested review from moreal, Atralupus and a team May 30, 2024 04:05
@boscohyun boscohyun self-assigned this May 30, 2024
@boscohyun boscohyun mentioned this pull request May 30, 2024
2 tasks
Copy link
Member

@Atralupus Atralupus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@boscohyun boscohyun merged commit be65a91 into main May 30, 2024
3 checks passed
@boscohyun boscohyun deleted the feat/implement-avatar-query branch May 30, 2024 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants