Releases: graphile/operation-hooks
v1.0.0 - add support for `RAISE NOTICE`
- 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
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.)