mirror of
https://github.com/directus/directus.git
synced 2026-01-29 11:17:57 -05:00
Fix import in loaders
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import DataLoader from 'dataloader';
|
||||
import database, { schemaInspector } from './database';
|
||||
import database from './database';
|
||||
|
||||
async function getFields(keys: { collection: string; field: string }[]) {
|
||||
const records = await database
|
||||
@@ -15,6 +15,7 @@ async function getFields(keys: { collection: string; field: string }[]) {
|
||||
['collection', 'field'],
|
||||
keys.map((key) => [key.collection, key.field])
|
||||
);
|
||||
|
||||
return keys.map((key) =>
|
||||
records.find((record) => record.collection === key.collection && record.field === key.field)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user