Skip to content

Commit

Permalink
Implement default display name for sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
davekaj committed Nov 19, 2020
1 parent ce40d3e commit ff89ce0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ type GraphAccount @entity {
defaultName: GraphAccountName # Can optimize in future by checking ENS & others to make sure they still own the name
"Time the account was created"
createdAt: Int!
"Default display name is the current default name. Used for filtered queries"
defaultDisplayName: String # this is new***************************

# IPFS Metadata
"True if it is an organization. False if it is an individual"
Expand Down
1 change: 1 addition & 0 deletions src/mappings/gns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export function handleSetDefaultName(event: SetDefaultName): void {
// the good name with null
if (newDefaultName != null) {
graphAccount.defaultName = newDefaultName
graphAccount.defaultDisplayName = event.params.name
}
graphAccount.save()
}
Expand Down

0 comments on commit ff89ce0

Please sign in to comment.