From fe354dc4c70bb019b209e572eb7566d7b77979cc Mon Sep 17 00:00:00 2001 From: rijkvanzanten Date: Tue, 3 Aug 2021 19:01:46 -0400 Subject: [PATCH] don't fetch unused column --- api/src/utils/get-schema.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/api/src/utils/get-schema.ts b/api/src/utils/get-schema.ts index 06b775dbf7..f4102510f0 100644 --- a/api/src/utils/get-schema.ts +++ b/api/src/utils/get-schema.ts @@ -132,9 +132,13 @@ async function getDatabaseSchema( const fields = [ ...(await database - .select< - { id: number; collection: string; field: string; required: boolean; special: string; note: string | null }[] - >('id', 'collection', 'field', 'required', 'special', 'note') + .select<{ id: number; collection: string; field: string; special: string; note: string | null }[]>( + 'id', + 'collection', + 'field', + 'special', + 'note' + ) .from('directus_fields')), ...systemFieldRows, ].filter((field) => (field.special ? toArray(field.special) : []).includes('no-data') === false);