Skip to content

Commit

Permalink
fix: throw error in resolver rather than return it
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyslbw committed Mar 18, 2021
1 parent a6387b3 commit dd9a031
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/api-cardano-db-hasura/src/executableSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit dd9a031

Please sign in to comment.