mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-24 03:00:09 -04:00
Fix getBoxProfile resolver for players with no ETH address
This commit is contained in:
@@ -7,6 +7,8 @@ export const getBoxProfile: QueryResolvers['getBoxProfile'] = async (
|
||||
_,
|
||||
{ address },
|
||||
) => {
|
||||
if (!address) return null;
|
||||
|
||||
const boxProfile = await Box.getProfile(address);
|
||||
|
||||
if (Object.keys(boxProfile).length === 0) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export const typeDefs = `
|
||||
type Query {
|
||||
getBoxProfile(address: String!): BoxProfile
|
||||
getBoxProfile(address: String): BoxProfile
|
||||
}
|
||||
|
||||
type BoxProfile {
|
||||
|
||||
Reference in New Issue
Block a user