See #25911
A recent perf improvement changed the return object in createMDXNode (https://github.com/gatsbyjs/gatsby/pull/25757/files#diff-15e9617772dbbdaa3f4c5399f3291de9R42)
It also changed the arguments passed to it.
This is a breaking change for those who were calling the function directly in the their gatsby-node.js file.
We should figure out if this is a necessary breaking change and document/bump versions accordingly. Or figure out a different option that won't be.
Hmm, yeah this usage is technically an "undocumented" API, but also exists on developer blogs. So we should probably make sure we're being backwards compatible here if we can be.
but also exists on developer blogs.
Thanks @johno for the link, I was using this technique but didn't remember where I pick it.
Looking forward to the progress of this PR. Also available to provide any info regarding _use cases_.
We've gone ahead and reverted the breaking PR (thanks to @laurieontech) and we'll explore a new way to integrate these performance improvements next week so they don't break this use case.
We'll keep you updated!
Ok. The API was not public but used anyways.
Guess we'll keep it as is and deprecate it. I'll create a new function to do what needs to be done, issue a deprecation warning for the existing function and warn about perf implications of when the user keeps using it, or using something that uses it.
(Going to close this issue as the commit was reverted and will take a safer appraoch when trying again)