Skip to content

Commit

Permalink
Update the thing that TS didn't catch for me :sadface:
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-scheer committed Mar 31, 2021
1 parent 6abb7d4 commit 466c6e1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions harmonizer/js/do_compose.js
Expand Up @@ -45,10 +45,12 @@ function parseTypedefs(source) {

try {
/**
* @type {{ errors: Error[], coreSchema?: undefined } | { errors?: undefined, coreSchema: string; }}
* @type {{ errors: Error[], supergraphSdl?: undefined } | { errors?: undefined, supergraphSdl: string; }}
*/
const composed = composition.composeAndValidate(serviceList);
done(composed.errors ? { Err: composed.errors } : { Ok: composed.coreSchema })
} catch(err) {
done({ Err: [err] })
done(
composed.errors ? { Err: composed.errors } : { Ok: composed.supergraphSdl },
);
} catch (err) {
done({ Err: [err] });
}

0 comments on commit 466c6e1

Please sign in to comment.