Merge branch 'bug/teamBySlug'

This commit is contained in:
Barry Low committed 2018-11-07 14:32:43 -08:00
commit ea9df033d3
2 files changed
+4 -1

No files matched your search

+2
View File
@@ -20,6 +20,8 @@ export const teamByName = async (parent, { name }, ctx, info) => {
}
export const teamBySlug= async (parent, { slug }, ctx, info) => {
logger.info('teamsBySlug')
logger.info(`slug: ${slug}`)
return ctx.db.query.team({ where: { slug: slug } }, TEAMS_FRAGMENT)
}
+2 -1
View File
@@ -1,7 +1,7 @@
import { logger } from '../../../logger'
import { member, owner } from './Member'
import { teams, teamById, teamByName, teamWithRole, teamsByOwner, teamsByRole } from './Team'
import { teams, teamById, teamByName, teamBySlug, teamWithRole, teamsByOwner, teamsByRole } from './Team'
import{ fbByTeamMember } from './TeamMember'
export const resolvers = {
@@ -10,6 +10,7 @@ export const resolvers = {
teams: (parent, arg, ctx, info) => teams(parent, arg, ctx, info),
teamById: (parent, arg, ctx, info) => teamById(parent, arg, ctx, info),
teamByName: (parent, arg, ctx, info) => teamByName(parent, arg, ctx, info),
teamBySlug: (parent, arg, ctx, info) => teamBySlug(parent, arg, ctx, info),
teamWithRole: (parent, arg, ctx, info) => teamWithRole(parent, arg, ctx, info),
teamsByOwner: (parent, arg, ctx, info) => teamsByOwner(parent, arg, ctx, info),
teamsByRole: (parent, arg, ctx, info) => teamsByRole(parent, arg, ctx, info),