apollographql / rover

The CLI for Apollo GraphOS
https://rover.apollo.dev
Other
408 stars 85 forks source link

Support publishing multiple files for a single schema/subgraph #1741

Open smyrick opened 1 year ago

smyrick commented 1 year ago

Description

Today, Rover (and Federation) operate on the idea that a subgraph schema is defined in a single file. There are server libraries out there that sometimes that is not the case. To work with Rover we then force devs to add extra tooling that concats the files together before publishing or use introspection.

The main benefit I see though if Rover/GraphOS/Federation supported multiple files, we could support the GraphQL spec Type Extensions and allow people to define Fed directives in an extensions file. Then they wouldn't actually have to have specific Federation support in their GraphQL library, it could be all defined in separate Fed specific files, making adoption a lot easier

Impact

This would involve any command that accepted a schema or schema file arg.

Possbile Solutions/Examples

smyrick commented 1 year ago

Probably requires support in composition first: https://github.com/apollographql/federation/issues/2783