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

feat: full support for @link directive #24

Open
4 tasks
dariuszkuc opened this issue Oct 18, 2023 · 0 comments
Open
4 tasks

feat: full support for @link directive #24

dariuszkuc opened this issue Oct 18, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@dariuszkuc
Copy link
Member

Currently we don't support all features of @link directive.

directive @link(
    url: String!,
    as: String,
    import: [Import],
    for: Purpose)
repeatable on SCHEMA

scalar Import

enum Purpose {
  SECURITY
  EXECUTION
}

Using @link directive we can "import" other definitions into our current schema. If we don't explicitly import them, those types should be namespaced (prefixed with __ which defaults to spec name). Currently we explicitly import ALL federation directives regardless whether they are used within the schema or not. Similarly when importing elements, users can specify custom names within the local schema, e.g. import @key to become @myKey.

We should support following features

  • ability to specify list of imported elements
  • namespace unimported spec elements
  • ability to provide custom namespace (should default to spec name)
  • ability to rename imported elements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant