You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, avatars can only be queried using their address. However, in the game, most users rely on nicknames, and it would be more intuitive for users to search for avatars by nickname through Mimir.
Update Query
Modify the GraphQL query to accept nickname as a parameter.
Example:
publicasyncTask<AvatarState>GetAvatarAsync(Address?address,string?nickname,[Service]AvatarRepositoryrepo){if(addressis not null){return(awaitrepo.GetByAddressAsync(address.Value)).Object;}elseif(!string.IsNullOrEmpty(nickname)){return(awaitrepo.GetByNicknameAsync(nickname)).Object;}else{thrownewArgumentException("Either address or nickname must be provided.");}}
To set up the database locally, follow the steps below:
Refer to the CONTRIBUTING.md Document:
Check the CONTRIBUTING.md file in the Mimir repository for detailed setup instructions.
Download Data:
Download the sample data from this link.
Restore or Import Data:
Once downloaded, ensure the avatar collection is created in your MongoDB instance and populate it with the provided data. You can use tools like a MongoDB GUI (e.g., Compass) to import the data.
The text was updated successfully, but these errors were encountered:
Currently, avatars can only be queried using their address. However, in the game, most users rely on nicknames, and it would be more intuitive for users to search for avatars by nickname through Mimir.
Here’s how the data is stored in the database:
Desired Query Example:
Steps to Implement:
Update AvatarRepository
Add a new method
GetByNicknameAsync
to search by nickname. Use the following filter:Update Query
Modify the GraphQL query to accept
nickname
as a parameter.Example:
To set up the database locally, follow the steps below:
Refer to the
CONTRIBUTING.md
Document:Check the CONTRIBUTING.md file in the Mimir repository for detailed setup instructions.
Download Data:
Download the sample data from this link.
Restore or Import Data:
Once downloaded, ensure the
avatar
collection is created in your MongoDB instance and populate it with the provided data. You can use tools like a MongoDB GUI (e.g., Compass) to import the data.The text was updated successfully, but these errors were encountered: