apollographql / apollographql/federation
Allow gateway to dynamically reload schema in self-managed federation
- Dominant language
- TypeScript
- Stars
- 725
- Forks
- 276
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 1
Description
Since one of the latest releases (prolly 0.23) we no longer have ability to call `.load()` to reload previously loaded schema.
I used this function to reload it on development environments. At this moment to be able to call this function I have to make this workaround:
```typescript
import { ApolloGateway } from '@apollo/gateway';
export class Gateway extends ApolloGateway {
public async refreshSchema() {
return await this.updateComposition();
}
}
```
to be able to call this protected method updateComposition.
Is there any other way to do that (or is going to be)?
Contributor guide
Research direction
Start at ApolloGateway and the protected updateComposition entry point mentioned in the issue, then trace the self-managed federation schema-loading lifecycle. Clarify the intended public behavior for reloading a previously loaded schema and define done as allowing that refresh without requiring a subclass workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100