Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
fix(gatsby): Add touchNode to populate typeOwners (#15918) #15919
Gatsby keeps track of different node types by different source plugins and allows source plugins to only manage nodes of types they own. Unfortunately typeOwners mapping is only populated when nodes are being created (by createNode API). If nodes of certain type have only been touched so far (with touchNode), no source plugin owns that node type. This prevents the real owner of that node type from deleting cached nodes until it has created at least a single node of that type.
This seems to be the minimal change to make touchNode populate typeOwners mapping, but I don't know if that's the correct one.