Fork me on GitHub
#pathom
<
2022-11-28
>
c0rrzin20:11:44

is there a way to unregister a mutation or resolver from an index?

c0rrzin20:11:23

there involves a public api - I really didn't want to mess with the index map myself

caleb.macdonaldblack15:11:53

I’m not sure myself but I’m intrigued. What’s the usecase?

wilkerlucio20:11:02

its not trivial because the way the index is build, some indexes are accumulative and its hard to know if something was add multiple times by different resolvers/mutations, in that case it would require some full analysis to avoid removing something that might break the index

wilkerlucio20:11:13

the simplest way is to re-build the index without the things you dont want

wilkerlucio20:11:34

you can use the index-resolvers & index-mutations to do so, get everything there, remove what you dont want, and rebuild the index

c0rrzin20:11:27

alright, thanks!

c0rrzin20:11:26

@U3XCG2GBZ the use case is that I want to dynamically register user mutations and resolvers, and the final index should change given the context of that user