diff --git a/src/resolvers/QueryResolvers.ts b/src/resolvers/QueryResolvers.ts index 34c31e3..08a415f 100644 --- a/src/resolvers/QueryResolvers.ts +++ b/src/resolvers/QueryResolvers.ts @@ -13,10 +13,8 @@ export const QueryResolvers: Resolvers = { }, system: async (_parent, args, contextValue, _info) => { if (!args.id) return null; - const system = contextValue.systems.find((system) => { - return system.id === args.id; - }); - if (system === undefined) return null; + const system = contextValue.findSystemById(args.id); + if (system === null) return null; return { name: system.name,