Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import graphql.schema.GraphQLArgument
* directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE
*
* # federation v2 definition
* directive @key(fields: _FieldSet!, resolvable: Boolean) repeatable on OBJECT | INTERFACE
* directive @key(fields: _FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE
* ```
*
* The @key directive is used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface. Key directive should be specified on the root entity type as
Expand Down Expand Up @@ -116,6 +116,7 @@ internal val KEY_DIRECTIVE_TYPE_V2: graphql.schema.GraphQLDirective = graphql.sc
GraphQLArgument.newArgument()
.name("resolvable")
.type(Scalars.GraphQLBoolean)
.defaultValueProgrammatic(true)
)
.repeatable(true)
.build()
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private val FEDERATED_SDL_V2 =
) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT

"Space separated list of primary keys needed to access federated object"
directive @key(fields: _FieldSet!, resolvable: Boolean) repeatable on OBJECT | INTERFACE
directive @key(fields: _FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE

"Links definitions within the document to external schemas."
directive @link(import: [String], url: String) repeatable on SCHEMA
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ type Product {
directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE

# federation v2 definition
directive @key(fields: _FieldSet!, resolvable: Boolean) repeatable on OBJECT | INTERFACE
directive @key(fields: _FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE
```

The `@key` directive is used to indicate a combination of fields that can be used to uniquely identify and fetch an
Expand Down