Add fbByFbSlug query
This commit is contained in:
1 parent
2d9f7d8e06
commit
146527815c
3 files changed
+11
-2
No files matched your search
@@ -8,3 +8,10 @@ export const fbByFbId = async (parent, { fbId }, ctx, info) => {
|
||||
logger.info(`fbByFbId response: ${JSON.stringify(await FB)}`)
|
||||
return FB
|
||||
}
|
||||
|
||||
export const fbByFbSlug = async (parent, { fbSlug }, ctx, info) => {
|
||||
logger.info(`fbByFbSlug: ${fbSlug}`)
|
||||
let FB = await ctx.db.query.financialBeings({where: {slug: fbSlug}}, FB_FRAGMENT)
|
||||
logger.info(`fbByFbSlug response: ${JSON.stringify(await FB)}`)
|
||||
return FB
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import { logger } from '../../../logger'
|
||||
import { member, owner } from './Member'
|
||||
import { teams, teamById, teamsByIds, teamByName, teamBySlug, teamWithRole, teamAuthorization, teamsByOwner, teamsByRole } from './Team'
|
||||
import{ fbByTeamMember } from './TeamMember'
|
||||
import{ fbByFbId } from './FinancialBeing'
|
||||
import{ fbByFbId, fbByFbSlug } from './FinancialBeing'
|
||||
|
||||
export const resolvers = {
|
||||
Query: {
|
||||
@@ -19,6 +19,7 @@ export const resolvers = {
|
||||
teamsByRole: (parent, arg, ctx, info) => teamsByRole(parent, arg, ctx, info),
|
||||
owner: (parent, arg, ctx, info) => owner(parent, arg, ctx, info),
|
||||
fbByTeamMember: (parent, arg, ctx, info) => fbByTeamMember(parent, arg, ctx, info),
|
||||
fbByFbId: (parent, arg, ctx, info) => fbByFbId(parent, arg, ctx, info)
|
||||
fbByFbId: (parent, arg, ctx, info) => fbByFbId(parent, arg, ctx, info),
|
||||
fbByFbSlug: (parent, arg, ctx, info) => fbByFbSlug(parent, arg, ctx, info)
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ type Query {
|
||||
teamsByRole: [Team!]! @isAuthenticated
|
||||
fbByTeamMember: Team @isAuthenticated
|
||||
fbByFbId(fbId: String!): FinancialBeings
|
||||
fbByFbSlug(fbSlug: String!): FinancialBeings
|
||||
owner: Member @isAuthenticated
|
||||
member: Member @isAuthenticated
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user