Jscott388
06/05/2018, 8:45 PMmedelman
06/05/2018, 8:51 PMJscott388
06/05/2018, 8:51 PMmedelman
06/05/2018, 8:51 PMJscott388
06/05/2018, 8:52 PMJscott388
06/05/2018, 8:52 PMJscott388
06/05/2018, 8:53 PMJscott388
06/05/2018, 8:54 PMJscott388
06/05/2018, 8:54 PMmedelman
06/05/2018, 8:57 PMmedelman
06/05/2018, 8:58 PMnumberOfUsers: async (parent, args, ctx: Context, info) => {
return ctx.db.query.usersConnection({}, info)
},
medelman
06/05/2018, 8:58 PM{
numberOfUsers {
aggregate {
count
}
}
}
medelman
06/05/2018, 8:58 PMmedelman
06/05/2018, 8:59 PMusers
part and define the query in your local schema.graphql file.medelman
06/05/2018, 9:00 PMtype Query = {
...
numberOfUsers: UserConnection!
...
}
Jscott388
06/05/2018, 9:03 PMJscott388
06/05/2018, 9:04 PMJscott388
06/05/2018, 9:05 PMmedelman
06/05/2018, 9:05 PMResidentialConnection
?medelman
06/05/2018, 9:06 PMJscott388
06/05/2018, 9:07 PMmedelman
06/05/2018, 9:08 PMresidentialsConnection
in your resolver (i.e., ctd.db.query.residentialsConnection(..)
) but change it to ResidentialConnection
in schema.graphqlmedelman
06/05/2018, 9:08 PMtype Query {
residentials(orderBy: ResidentialOrderByInput, skip: Int, first: Int): [Residential]!
residential(SystemID: Int): Residential
count: ResidentialConnection!
}
Jscott388
06/05/2018, 9:09 PMmedelman
06/05/2018, 9:09 PMJscott388
06/05/2018, 9:09 PMJscott388
06/05/2018, 9:10 PMJscott388
06/05/2018, 9:10 PMmedelman
06/05/2018, 9:11 PMcount
above (which I might rename just to ensure no naming conflicts occur), you need to amend the resolver to return context.prisma.query.residentialsConnection({}, info)
medelman
06/05/2018, 9:11 PMmedelman
06/05/2018, 9:11 PMJscott388
06/05/2018, 9:12 PMmedelman
06/05/2018, 9:13 PMJscott388
06/05/2018, 9:13 PMmedelman
06/05/2018, 9:14 PMmedelman
06/05/2018, 9:14 PMJscott388
06/05/2018, 9:15 PMJscott388
06/05/2018, 9:16 PMJscott388
06/05/2018, 9:16 PMJscott388
06/05/2018, 9:17 PMJscott388
06/05/2018, 9:17 PMmedelman
06/05/2018, 9:17 PMJscott388
06/05/2018, 9:31 PMmedelman
06/05/2018, 9:44 PMresidentialsConnection
query.medelman
06/05/2018, 9:45 PMResidentialWhereInput
argument.medelman
06/05/2018, 9:46 PMnilan
06/06/2018, 8:11 AM