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

Torii metadata query format #1133

Merged
merged 1 commit into from
Nov 1, 2023
Merged

Conversation

broody
Copy link
Collaborator

@broody broody commented Nov 1, 2023

For metadata query, graphql will parse and return data under content field. Socials field returns list

query {
  metadatas {
    total_count
    edges {
      node {
        uri
        cover_img
        icon_img
        content {
          name
          description
          website
          cover_uri
          icon_uri
          socials {
            name
            url
          }
        }
      }
    }
  }
}
{
  "data": {
    "metadatas": {
      "total_count": 1,
      "edges": [
        {
          "node": {
            "uri": "ipfs://QmcDVFdDph5N2AoW7L2vruyhy6A3wiU8Mh5hEyfVY68ynh/",
            "icon_img": "based64 encoded",
            "cover_img": "based64 encoded",
            "content": {
              "name": "types-test",
              "description": "Graphql types testing",
              "website": "https://dojoengine.org/",
              "cover_uri": "ipfs://QmauCRNhWc51MRrmmZRZHhWi1ri2Y3iwvdXSbfMx6dSAiT",
              "icon_uri": "ipfs://QmTuWjzbjtNLZA57vVWtsee2BvWffSG1xKM1bw9AeDKRN3",
              "socials": [
                {
                  "name": "x",
                  "url": "https://twitter.com/dojostarknet"
                }
              ]
            }
          }
        }
      ]
    }
  }
}

cc @JunichiSugiura

@tarrencev tarrencev merged commit 366500f into main Nov 1, 2023
11 checks passed
@tarrencev tarrencev deleted the torii-metadata-nested-content branch November 1, 2023 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants