diff --git a/api/database/datamodel.graphql b/api/database/datamodel.graphql index 4ecab3878..41c8723bf 100644 --- a/api/database/datamodel.graphql +++ b/api/database/datamodel.graphql @@ -36,6 +36,7 @@ type Team { fb: [FinancialBeings!]! @relation (name: "TeamFinancialBeing", onDelete: SET_NULL) status: [TeamStatus!]! createdAt: DateTime! + updatedAt: DateTime! } type TeamProfile { diff --git a/api/src/generated/prisma.graphql b/api/src/generated/prisma.graphql index 169f3ad2f..084e457f9 100644 --- a/api/src/generated/prisma.graphql +++ b/api/src/generated/prisma.graphql @@ -1,5 +1,5 @@ # source: http://localhost:4466 -# timestamp: Tue Nov 20 2018 08:54:59 GMT-0800 (Pacific Standard Time) +# timestamp: Tue Nov 20 2018 09:55:31 GMT-0800 (Pacific Standard Time) type AggregateFBStatus { count: Int! @@ -1477,6 +1477,7 @@ type Team implements Node { fb(where: FinancialBeingsWhereInput, orderBy: FinancialBeingsOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [FinancialBeings!] status(where: TeamStatusWhereInput, orderBy: TeamStatusOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [TeamStatus!] createdAt: DateTime! + updatedAt: DateTime! } """A connection to a list of items.""" @@ -2161,6 +2162,7 @@ type TeamPreviousValues { slug: String! owner: String! createdAt: DateTime! + updatedAt: DateTime! } type TeamProfile implements Node { @@ -3116,6 +3118,28 @@ input TeamWhereInput { """All values greater than or equal the given value.""" createdAt_gte: DateTime + updatedAt: DateTime + + """All values that are not equal to given value.""" + updatedAt_not: DateTime + + """All values that are contained in given list.""" + updatedAt_in: [DateTime!] + + """All values that are not contained in given list.""" + updatedAt_not_in: [DateTime!] + + """All values less than the given value.""" + updatedAt_lt: DateTime + + """All values less than or equal the given value.""" + updatedAt_lte: DateTime + + """All values greater than the given value.""" + updatedAt_gt: DateTime + + """All values greater than or equal the given value.""" + updatedAt_gte: DateTime profile: TeamProfileWhereInput members_every: TeamMembersWhereInput members_some: TeamMembersWhereInput diff --git a/api/src/graphql/resolvers/Query/Team.js b/api/src/graphql/resolvers/Query/Team.js index 783ce9c82..2149dc71c 100644 --- a/api/src/graphql/resolvers/Query/Team.js +++ b/api/src/graphql/resolvers/Query/Team.js @@ -36,7 +36,7 @@ export const teamsByOwner = async (parent, args, ctx, info) => { throw new AuthenticationError() return } - return ctx.db.query.teams({where: { owner: authId }, orderBy:'updatedAt_DESC'}, TEAMS_FRAGMENT) + return ctx.db.query.teams({where: { owner: authId }, orderBy:'createdAt_DESC'}, TEAMS_FRAGMENT) } export const teamsByRole = async (parent, args, ctx, info) => {