Not sure if it's possible in Apollo Server, but GraphQL Yoga can serve schema conditionally: https://the-guild.dev/graphql/yoga-server/docs/features/schema#conditional-schema
You could share /graphql
endpoint for federated and non-federated schema that depends on an http header (or any property of the http request) or have two endpoints serving different schemas.