resolver: front-end resolution of non-core objects
Description
The front-end resolver component resolves the returned objects from the resolve/search call to the protobuf.js object.
However, this currently only resolves objects from the core package @clutch-sh/api. If we have a custom package e.g. my-custom-api-package that we build in a custom gateway, the .fromObject call will fail as the object is not in the core package.
This results in the error: 'Cannot read property 'fromObject' of undefined'., which comes from
import * as $pbclutch from "@clutch-sh/api";
and then
https://github.com/lyft/clutch/blob/5ce6456b376edce0517acf4b8a0a5049512d4ed9/frontend/packages/core/src/Resolver/fetch.tsx#L63
We need to have some way to configure the resolver to also attempt fromObject for other packages.
Slack thread with original report: https://lyftoss.slack.com/archives/C015UJ6LED9/p1604147269019800
Complexity [S/M/L]: S
Pulling this into this weeks sprint for investigation and resolution.
Just an update on this - we landed support for dynamic API resolution in #753 but we would eventually like to have this be configuration driven based on the workflow.