vulcan-docs
vulcan-docs copied to clipboard
Add documentation about callbacks
When you add callbacks, it's unclear that the naming convention for collection hooks are being supplied in lower case which is different than the naming convention of the Type definition which is uppercase.
ie:
modifier = runCallbacks({ name: `movie.update.before`, iterator: data, properties: { document, currentUser }});
const Movies = createCollection({
typeName: "Movie",
schema,
resolvers,
mutations
});
Good point. I think ultimately we'll make callback names case-insensitive to avoid this issue altogether.