Update apollo.js to use async

This commit is contained in:
Jan Dvorak
2024-02-23 13:23:19 +01:00
committed by GitHub
parent 0f916b33e3
commit 15cd101bb4

View File

@@ -9,8 +9,8 @@ const express = WebAppInternals.NpmModules.express.module;
const resolvers = {
Query: {
getLink: async (obj, { id }) => LinksCollection.findOne(id),
getLinks: async () => LinksCollection.find().fetch()
getLink: async (obj, { id }) => LinksCollection.findOneAsync(id),
getLinks: async () => LinksCollection.find().fetchAsync()
}
};