Skip to content

Commit

Permalink
Since setPreset can throw now... we better handle that.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie committed May 3, 2024
1 parent 48ebd68 commit de8dd95
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions postgraphile/postgraphile/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,16 @@ export function postgraphile(
oldSchemaResult.resolve(schemaResult);
}
if (server) {
server.setPreset(schemaResult.resolvedPreset);
server.setSchema(schemaResult.schema);
try {
// TODO: `setPreset` should go in a queue
server.setPreset(schemaResult.resolvedPreset);
server.setSchema(schemaResult.schema);
} catch (e) {
console.error(
"Error occurred whilst setting preset and schema to new result:",
);
console.error(e);
}
}
});
} else {
Expand Down

0 comments on commit de8dd95

Please sign in to comment.