Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComposeDirective should be added to the apiSchema as well as the supergraph schema. #2895

Open
darren-west opened this issue Dec 20, 2023 · 2 comments

Comments

@darren-west
Copy link

darren-west commented Dec 20, 2023

Description

ComposeDirective currently has all directives from the supergraph stripped from the final api schema. This makes it difficult to implement a custom directive in a federated gateway as the directive is not included in the api schema.

All directives are removed here.

An option would be to add composeDirective directives to the api schema or alternatively extend the composeDirective to take an option @composeDirective(name: "@foo", includeInApiSchema: true) or equivalent.

@jmccaull
Copy link

jmccaull commented Mar 13, 2024

This seems consistent with what I'm seeing in router as well apollographql/router#4793. We are working on upgrading to Fed 2 and router independently, getting this functionality in both places would help

@Inlustra
Copy link

I would like to raise this aswell.
Implementing a custom directive with a
import { mapSchema } from "@graphql-tools/utils";
Is currently impossible. I have a suspicion that this might be by design to push people towards the paid apollo router?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants