Skip to content

Releases: graphile/operation-hooks

v1.0.0 - add support for `RAISE NOTICE`

29 Jul 09:02
Compare
Choose a tag to compare
  • In mutations you can now RAISE NOTICE... USING ERRCODE = 'OPMSG' and the notice will get pushed into messages
  • Fixes a bug with interactions between @graphile/operation-hooks and @graphile/pg-pubsub

NO BREAKING CHANGES; just felt it was time to bump this to a 1.0 👍

v0.2.0

19 Dec 16:20
Compare
Choose a tag to compare

⚠️ BREAKING CHANGE ⚠️ to the SQL hooks; all previous SQL hooks are now invalid.

SQL hooks have now both become easier to use and more powerful. Gone is the old way of defining the hooks using the mutation name (e.g. updateUserById) and having to navigate through the input object to find the data you need. Now you just use the table name and SQL operation to name the function (e.g. users_insert_before, note there's no need for quotes here too!), and you're automatically passed the relevant data object (e.g. userPatch for the updateUser* mutations). You're also now passed the record from the DB, so there's no struggles over parsing nodeId or determining the relevant unique key to use for the mutation. And our function support has increased significantly.

I've updated the README with the new instructions. Enjoy!

(The JS API is unchanged.)

v0.1.2

19 Dec 16:13
Compare
Choose a tag to compare

Fix a bug when using this as a library plugin.

v0.1.1

19 Dec 16:13
Compare
Choose a tag to compare

Initial release.