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

[federation] support new @composeDirective #72

Closed
dariuszkuc opened this issue Feb 17, 2023 · 0 comments · Fixed by #92
Closed

[federation] support new @composeDirective #72

dariuszkuc opened this issue Feb 17, 2023 · 0 comments · Fixed by #92
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@dariuszkuc
Copy link

Apollo Federation v2.1 introduced new @composeDirective directive that allows users to specify directives that should be preserved in the supergraph composition (by default composition strips out most directives from supergraph).

extend schema
  @link(
    url: "https://specs.apollo.dev/federation/v2.3",
    import: ["@composeDirective", "@extends", "@external", "@key", "@inaccessible", "@interfaceObject", "@override", "@provides", "@requires", "@shareable", "@tag"]
  )
  @link(url: "https://myspecs.dev/myCustomDirective/v1.0", import: ["@custom"])
  @composeDirective(name: "@custom")

// will be present in the supergraph definition
directive @custom on OBJECT

type Product @custom @key(fields: "id")
  id: ID!
  // other fields omitted for clarity
}

Additional resources:


New directive functionality can be tested using Apollo Federation Subgraph Compatibility NPX script (and Github Action). Example integration project is already provided in the subgraph compatibility testing repository.

@kzlsakal kzlsakal added the enhancement New feature or request label Feb 22, 2023
@kzlsakal kzlsakal added the help wanted Extra attention is needed label Feb 6, 2024
cschiewek added a commit to Frameio/absinthe_federation that referenced this issue Feb 8, 2024
@kzlsakal kzlsakal reopened this Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants