Merge pull request #57 from AdvancedAlgos/feature/fix-issues

Feature/fix issues
This commit is contained in:
Barry Low authored and GitHub committed 2018-11-07 09:32:10 -08:00
commit 315eb2698d
6 files changed
+43 -40

No files matched your search

+5 -1
View File
@@ -16,7 +16,11 @@ export const teamById = async (parent, { teamId }, ctx, info) => {
}
export const teamByName = async (parent, { name }, ctx, info) => {
return ctx.db.query.team({ where: { name: name } }, `{ name }`)
return ctx.db.query.team({ where: { name: name } }, TEAMS_FRAGMENT)
}
export const teamBySlug= async (parent, { slug }, ctx, info) => {
return ctx.db.query.team({ where: { slug: slug } }, TEAMS_FRAGMENT)
}
export const teamWithRole = async (parent, { teamId, role }, ctx, info) => {
+1
View File
@@ -9,6 +9,7 @@ type Query {
teams: TeamConnection
teamDetails: [Team!]! @isAuthenticated
teamByName(name: String!): Team
teamBySlug(slug: String!): Team
teamById(teamId: String!): Team
teamWithRole(teamId: String!, role: String!): Team
teamsByOwner: [Team!]! @isAuthenticated