Recommended way to codegen against federated subgraphs

We have multiple services with schemas that live outside of each-others’ contexts (different repos essentially). One of the services (our frontend) has dependencies on another for type generation. For instance, when calling graphql-codegen we’ll see something like this about unknown types:

       → [16:52:45] → GraphQL Document Validation failed with 4 errors;
       →   Error 0: GraphQLDocumentError: Unknown type "CategorySearchInput".
       →     at /app/frontend/estimate/search.graphql:1:26

What is the recommended way to handle this with managed federation + apollo router? Do we need to somehow pull down the remote schema at generation time? Can we reference the subgraph URL in our codegen.yaml? I can see tradeoffs to either of these solutions and would hope there’s some more approaches that I am not aware of. Thanks!