From dd9a031675e9cc708f2bb62b5cad1b454f74b14a Mon Sep 17 00:00:00 2001 From: Rhys Bartels-Waller Date: Thu, 18 Mar 2021 22:37:14 +1100 Subject: [PATCH] fix: throw error in resolver rather than return it --- packages/api-cardano-db-hasura/src/executableSchema.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/api-cardano-db-hasura/src/executableSchema.ts b/packages/api-cardano-db-hasura/src/executableSchema.ts index cdddcfde..62d87ab6 100644 --- a/packages/api-cardano-db-hasura/src/executableSchema.ts +++ b/packages/api-cardano-db-hasura/src/executableSchema.ts @@ -40,7 +40,7 @@ export async function buildSchema ( ) { const throwIfNotInCurrentEra = async (queryName: string) => { if (!(await hasuraClient.isInCurrentEra())) { - return new ApolloError(`${queryName} results are only available when close to the network tip. This is expected during the initial chain-sync.`) + throw new ApolloError(`${queryName} results are only available when close to the network tip. This is expected during the initial chain-sync.`) } } return makeExecutableSchema({