How to get the callback directive to work?


I can't get this to work for some reason:

type BlogPost
  id: ID! @id
  title: String
  slug: @callback(operations: [CREATE, UPDATE], name: "slug") 
const slugCallback = async (root: any) => {
  // console.log("Slug callback", root);
  return "something...";
const neoSchema = new Neo4jGraphQL({
  config: { callbacks: { slug: slugCallback } },

I receive the following error:
"name": "TypeError",
"message": "Failed to fetch",
"stack": "TypeError: Failed to fetch\n at

Seems like there's something wrong with the syntax. If I remove the @callback directive, then everything works as expected.

Hello, I think you may be fooled by the docment.
Yes,there is an error in docs.
slug: @callback(operations: [CREATE, UPDATE], name: "slug") should modified to
slug: String @callback(operations: [CREATE, UPDATE], name: "slug")
the above added String or some other type.
If you use ogm.init(). don't forget to pass config option to it too.