queryProfile
This operation queries a Profile when provided a handle or profileId
This query is capable of fetching activities associated with the Profile, which includes but not limited to:
Publications
Publications collected
NFT gallery items
Nabi Badge collections created
Nabi Badges owned
Profile statistics
non-exhaustive list, for full reference, refer to GraphQL Schema
Interface
GraphQL Schema
input ProfileGetQueryInput {
handle: String
profileId: String
}
type Query {
profile(profileGetQueryInput: ProfileGetQueryInput!): Profile
}
Input
ProfileGetQueryInput
: [Required] An object with eitherhandle
orprofileId
Operation
GraphQL Operation
query Profile {
profile(profileGetQueryInput: {
profileId: "0x1"
}) {
id
profileId
handle
nftTokenId
profileUri
ownedBy
metadataUrl
metadataS3Url
blockTimestamp
createdBlockHash
nftContract
# any other Profile fields
stats {
totalFollowers
totalFollowing
totalPosts
totalComments
totalMirrors
totalPublications
totalCollects
}
nftGallery {
id
createdAt
contractAddress
metadataS3Url
# any other NftGallery fields
}
collects {
id
createdAt
publicationType
publicationId
metadataS3Uri
collectId
# any other Collect fields
}
publications {
... on Post {
id
postId
content
contentS3Uri
profile {
metadataS3Url
}
# any other Post fields
}
... on Comment {
id
commentId
content
post {
id
postId
content
}
# any other Comment fields
}
... on Mirror {
id
mirrorId
content
post {
id
postId
content
}
# any other Mirror fields
}
}
badges {
id
createdAt
profileId
initiatedBy
contractAddress
nftContract
nftTokenId
collectionId
createdBlockHash
badgeImageS3Uri
name
# any other BadgeItem fields
}
badgeCollections {
id
name
createdAt
profileId
contractAddress
collectNftAddress
metadataUri
metadataS3Uri
createdBlockHash
collectionImageS3Uri
# any other BadgeCollection fields
}
}
}
Response
JSON Response
{
"data": {
"profile": {
"id": "35",
"profileId": "0x1",
"handle": "MysticPenguin",
"nftTokenId": "1",
"profileUri": "https://nabi-protocol-profile-nft-meta.s3.amazonaws.com/135a6f25-4e32-4e21-9461-f3c5203f7f6d.json",
"ownedBy": "UQCUNX18ptM5nW6qQgtvrI30zL73YALYagPx3XRMtzuUoAzM",
"metadataUrl": "https://nabi-protocol-profile-nft-meta.s3.amazonaws.com/ae8aa8f8-d0da-4671-9770-3d603963f9e0.json",
"metadataS3Url": "https://nabi-protocol-profile-nft-meta.s3.amazonaws.com/ae8aa8f8-d0da-4671-9770-3d603963f9e0.json",
"blockTimestamp": "2023-08-10T04:31:16.000Z",
"createdBlockHash": "koMujh2zQbL3ObxBrRYJknqySAhNj5b8PnV262rd1sM=",
"nftContract": "EQBKR7C6Lq8pnU8f9mw2vqjamH3q1pJUJH7ulIxtYpbD1tE0",
"stats": {
"totalFollowers": 1,
"totalFollowing": 0,
"totalPosts": 2,
"totalComments": 2,
"totalMirrors": 0,
"totalPublications": 4,
"totalCollects": 0
},
"nftGallery": [
{
"id": "d6f08bb3-3bc3-4d2c-8c7f-d3b5395fc415",
"createdAt": "2023-08-10T08:25:28.017Z",
"contractAddress": "0x0",
"metadataS3Url": "https://nabi-protocol-profile-nft-meta.s3.amazonaws.com/5c854700-171f-4822-8184-104207903a8f.json"
},
{
"id": "e0b10954-242d-4c2d-a23c-6e18890d10df",
"createdAt": "2023-08-10T09:29:35.761Z",
"contractAddress": "0x0",
"metadataS3Url": "https://nabi-protocol-profile-nft-meta.s3.amazonaws.com/56e63828-97a2-4d13-b27c-ae5ea426da88.json"
},
{
"id": "4b64125b-6780-4840-9eed-92e945672b36",
"createdAt": "2023-08-10T08:11:49.475Z",
"contractAddress": "0x0",
"metadataS3Url": "https://nabi-protocol-profile-nft-meta.s3.amazonaws.com/e2097837-3781-4e05-b922-f98f3ba4ea37.json"
},
{
"id": "dbb7e56e-d008-479b-8206-2ced39cac255",
"createdAt": "2023-08-10T09:48:12.756Z",
"contractAddress": "0x0",
"metadataS3Url": "https://nabi-protocol-profile-nft-meta.s3.amazonaws.com/118caebf-5f33-4748-875e-ec89a33cbea7.json"
},
{
"id": "507f686b-9038-49e5-b447-9dac023ced45",
"createdAt": "2023-08-10T09:52:37.978Z",
"contractAddress": "0x0",
"metadataS3Url": "https://nabi-protocol-profile-nft-meta.s3.amazonaws.com/b16d21e5-79d9-467c-92dd-54ea84ac1320.json"
},
{
"id": "3d7f28d0-dd61-46ab-b9cb-4afaf3c7e7c1",
"createdAt": "2023-08-10T09:58:52.298Z",
"contractAddress": "0x0",
"metadataS3Url": "https://nabi-protocol-profile-nft-meta.s3.amazonaws.com/928a3781-9214-4fdf-a02b-041c14a231a1.json"
}
],
"collects": [],
"publications": [
{
"id": "10",
"commentId": null,
"content": "damn girl, mia you one smart one",
"post": {
"id": "35",
"postId": "0xb-0x0",
"content": "I'm loving the DeFi space! So much potential for growth and innovation. #DeGenShifu #MegatonFi"
}
},
{
"id": "9",
"commentId": null,
"content": "SICK!",
"post": {
"id": "45",
"postId": "0xc-0x1",
"content": "Megaton Finance is offering awesome returns on their deposits! \nThis is a great way to earn passive income and support a new DeFi project. \n#ILurveTon #MegatonFi"
}
},
{
"id": "20",
"postId": "0x1-0x1",
"content": "HooRah, I’meeling adventurous today! Tried a new food spot and it did not disappoint 🍔🌮🍟 #Foodie",
"contentS3Uri": "https://nabi-protocol-profile-nft-meta.s3.amazonaws.com/9c1a3d5e-7fd8-458c-a176-a50ee711ac60.json",
"profile": {
"metadataS3Url": "https://nabi-protocol-profile-nft-meta.s3.amazonaws.com/ae8aa8f8-d0da-4671-9770-3d603963f9e0.json"
}
},
{
"id": "19",
"postId": "0x1-0x0",
"content": "OMG I just discovered this amazing new indie band and I can't stop listening! Check them out and let me know what you think 🎶 #NewMusic #Indie",
"contentS3Uri": "https://nabi-protocol-profile-nft-meta.s3.amazonaws.com/c54f9f45-0fa5-44ad-bc86-8bcac13af3f6.json",
"profile": {
"metadataS3Url": "https://nabi-protocol-profile-nft-meta.s3.amazonaws.com/ae8aa8f8-d0da-4671-9770-3d603963f9e0.json"
}
}
],
"badges": [
{
"id": "7e9f9cf7-9458-435a-ab15-b43fe8e997a1",
"createdAt": "2023-08-10T08:25:28.017Z",
"profileId": "0x1",
"initiatedBy": "0x1",
"contractAddress": "0x0",
"nftContract": null,
"nftTokenId": null,
"collectionId": "5a616c18-7477-428b-90e4-fad5854eff5b",
"createdBlockHash": null,
"badgeImageS3Uri": "https://nabi-protocol-test-1.s3.amazonaws.com/77f83238-88b3-445c-9244-198d5e03d0ea.jpg",
"name": "The Supportive Member"
},
{
"id": "65109a1b-1499-4501-a290-cc97120e0b88",
"createdAt": "2023-08-10T09:29:35.761Z",
"profileId": "0x1",
"initiatedBy": "0x4",
"contractAddress": "0x0",
"nftContract": null,
"nftTokenId": null,
"collectionId": "507514c0-ce78-4267-b22d-bd33ab3af5be",
"createdBlockHash": null,
"badgeImageS3Uri": "https://nabi-protocol-test-1.s3.amazonaws.com/f4d65546-c50a-4dcc-8d35-2a554df844e2.jpg",
"name": "The Connector"
},
{
"id": "a55c7a66-f1e0-4958-8312-aee8600ac5e3",
"createdAt": "2023-08-10T08:11:49.475Z",
"profileId": "0x1",
"initiatedBy": "0x0",
"contractAddress": "0x0",
"nftContract": null,
"nftTokenId": null,
"collectionId": "c8e30a5c-ad06-4c05-950f-0f0c195fce19",
"createdBlockHash": null,
"badgeImageS3Uri": "https://nabi-protocol-test-1.s3.amazonaws.com/2e569e5e-bf2b-4e77-875d-b3f239f33476.jpg",
"name": "The Social Butterfly"
}
],
"badgeCollections": [
{
"id": "5a616c18-7477-428b-90e4-fad5854eff5b",
"name": "The Supportive Member",
"createdAt": "2023-08-10T08:21:20.548Z",
"profileId": "0x1",
"contractAddress": null,
"collectNftAddress": null,
"metadataUri": "https://nabi-protocol-profile-nft-meta.s3.amazonaws.com/2a10e890-61d0-4140-9592-b9f93b8831e2.json",
"metadataS3Uri": "https://nabi-protocol-profile-nft-meta.s3.amazonaws.com/2a10e890-61d0-4140-9592-b9f93b8831e2.json",
"createdBlockHash": null,
"collectionImageS3Uri": null
}
]
}
}
}
Last updated