Skip to content

Commit 06180a8

Browse files
committed
bump to v1.0.1 and fix releasing savepoint
1 parent b3260b0 commit 06180a8

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changes
22

3+
## v1.0.1
4+
5+
* Correctly release the savepoint on error (thanks @sijad).
6+
37
## v1.0.0
48

59
* Bump dependencies.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Mark Lipscombe
3+
Copyright (c) 2018-2019 Mark Lipscombe
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postgraphile-plugin-nested-mutations",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Nested mutations plugin for PostGraphile",
55
"main": "index.js",
66
"repository": {

src/PostgraphileNestedMutationsPlugin.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,6 @@ module.exports = function PostGraphileNestedMutationPlugin(builder) {
635635
mutationData = finalRows[0];
636636
}
637637

638-
await pgClient.query('RELEASE SAVEPOINT graphql_nested_mutation');
639638
return {
640639
clientMutationId: input.clientMutationId,
641640
data: mutationData,
@@ -644,6 +643,8 @@ module.exports = function PostGraphileNestedMutationPlugin(builder) {
644643
debug(e);
645644
await pgClient.query('ROLLBACK TO SAVEPOINT graphql_nested_mutation');
646645
throw e;
646+
} finally {
647+
await pgClient.query('RELEASE SAVEPOINT graphql_nested_mutation');
647648
}
648649
};
649650

0 commit comments

Comments
 (0)