Mesh-serve in production
Hi,
Is it still possible to have programmatic resolvers like in v0 in order to do batching with objects as args ie
argsFromKeys(keys) {
return {
input: keys.map((key: any) => ({
id: key.bookId,
type: key.type,
amount: key.rate,
})),
};
},
key: {
bookId: root.id,
amount: root.price,
type: root.category?.type,
},
If not how would I achieve the equivalent in v1
@ardatan Turns out instead of using npx hive-gateway supergraph i could use npx mesh-serve supergraph. Now all my resolvers work when added to additionalResolvers in the gateway config. It would be good to know what the difference is and if you can use this in production as this is not documented anywhere?
The additionalResolvers should work in the Hive Gateway,see documentation. There's even E2E tests ensuring it works (like here and here). Is it still not working for you using the latest? If so, can you ideally provide a repro or at least the config file?
Closing the issue for now. Let us know if you still have any questions or issues. We can always reopen it!