Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant