Skip to content

Commit

Permalink
Add scalar link__Import and enum link__Purpose to @link definition
Browse files Browse the repository at this point in the history
  • Loading branch information
cappuc authored Dec 11, 2023
1 parent 9cc3ee2 commit e7a0103
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/Federation/Directives/LinkDirective.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,36 @@ public static function definition(): string
https://www.apollographql.com/docs/federation/federated-types/federated-directives#the-link-directive
"""
directive @link(url: String!, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA
"""
An element to import into the document.
```graphql
@link(url: "https://specs.apollo.dev/link/v1.0", import: ["@link", "Purpose"])
```
or an object with name and (optionally as):
```graphql
@link(url: "https://specs.apollo.dev/link/v1.0", import: [{ name: "Purpose", as: "LinkPurpose" }])
```
"""
scalar link__Import
"""
The role of a @linked schema.
"""
enum link__Purpose {
"""
Provide metadata necessary to securely resolve fields.
"""
SECURITY
"""
Provide metadata necessary to correctly resolve fields.
"""
EXECUTION
}
GRAPHQL;
}
}

0 comments on commit e7a0103

Please sign in to comment.