Skip to content

Commit

Permalink
Deprecate account.hasImage resolver (#10090)
Browse files Browse the repository at this point in the history
* refact: deprecate Account.hasImage resolver

* fix: add vendor default ordering
  • Loading branch information
kewitz committed May 15, 2024
1 parent a463dff commit a8fff4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
11 changes: 0 additions & 11 deletions server/graphql/v2/interface/Account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,6 @@ const accountFieldsDefinition = () => ({
},
},
},
hasImage: {
type: new GraphQLNonNull(GraphQLBoolean),
description: 'Returns whether this account has a custom image',
},
backgroundImageUrl: {
type: GraphQLString,
args: {
Expand Down Expand Up @@ -1015,13 +1011,6 @@ export const AccountFields = {
return collective.getImageUrl(args);
},
},
hasImage: {
type: new GraphQLNonNull(GraphQLBoolean),
description: 'Returns whether this account has a custom image',
resolve(collective) {
return Boolean(collective.image);
},
},
backgroundImageUrl: {
type: GraphQLString,
args: {
Expand Down
4 changes: 2 additions & 2 deletions server/graphql/v2/object/Host.js
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ export const GraphQLHost = new GraphQLObjectType({
where[Op.or] = searchTermConditions;
}

const findArgs = { where, limit: args.limit, offset: args.offset };
const findArgs = { where, limit: args.limit, offset: args.offset, order: [['createdAt', 'DESC']] };
if (args.forAccount) {
const account = await fetchAccountWithReference(args.forAccount);
findArgs['attributes'] = {
Expand All @@ -1303,7 +1303,7 @@ export const GraphQLHost = new GraphQLObjectType({
],
],
};
findArgs['order'] = [
findArgs.order = [
[sequelize.literal('"expenseCount"'), 'DESC'],
['createdAt', 'DESC'],
];
Expand Down

0 comments on commit a8fff4c

Please sign in to comment.