MCPcopy Create free account
hub / github.com/alpha2phi/python-apps / feed

Function feed

hackernews/backend-nodejs/src/resolvers/Query.js:1–25  ·  view source on GitHub ↗
(parent, args, context, info)

Source from the content-addressed store, hash-verified

1async function feed(parent, args, context, info) {
2 const where = args.filter
3 ? {
4 OR: [
5 { description: { contains: args.filter } },
6 { url: { contains: args.filter } }
7 ]
8 }
9 : {};
10
11 const links = await context.prisma.link.findMany({
12 where,
13 skip: args.skip,
14 take: args.take,
15 orderBy: args.orderBy
16 });
17
18 const count = await context.prisma.link.count({ where });
19
20 return {
21 id: 'main-feed',
22 links,
23 count
24 };
25}
26
27module.exports = {
28 feed

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected