Fix getBoxProfile resolver for players with no ETH address

This commit is contained in:
Hammad Jutt
2020-08-16 22:53:23 -06:00
parent 4c2bb981cf
commit d0b581d308
2 changed files with 3 additions and 1 deletions

View File

@@ -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) {

View File

@@ -1,6 +1,6 @@
export const typeDefs = `
type Query {
getBoxProfile(address: String!): BoxProfile
getBoxProfile(address: String): BoxProfile
}
type BoxProfile {