> ## Documentation Index
> Fetch the complete documentation index at: https://cosmo-docs.wundergraph.com/llms.txt
> Use this file to discover all available pages before exploring further.

# @openfed configureDescription

> The @openfed__configureDescription directive allows granular control over descriptions. It is not considered to be a V2-only directive.

## Definition

```graphql theme={"system"}
directive @openfed__configureDescription(
    descriptionOverride: String,
    propagate: Boolean! = true
) on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION |
INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | SCHEMA | UNION
```

## Overview

The `@openfed__configureDescription`directive serves four main functions:

1. Designate a certain description that should be propagated in the federated graph.

2. Designate a description override that should be propagated in the federated graph.

3. Designate that a certain description should never be propagated in the federated graph.

4. Setting a description on an extension type (which usually cannot define descriptions).

## Propagate a description to the federated graph

If the `propagate` argument is set to `true` (the default value), the description corresponding to the coordinates of the directive in the defining subgraph will be the description that appears for those coordinates in the federated graph.

## Hide a description from the federated graph

If the `propagate` argument is set to `false`, the description corresponding to the coordinates of the directive in the defining subgraph will not be considered for description that appears for those coordinates in the federated graph.

## Override a description

If the `propagate` argument is set to `true` (the default value), and the `descriptionOverride` argument is set to a non-empty string, that string will be the description that appears for those coordinates in the federated graph.

If the `propagate` argument is set to `false`, the `descriptionOverride` argument will be ignored.

## Composition rules

1. The coordinates that define the directive must define a description or provide a non-empty value to the `descriptionOverride` argument.

2. Only one instance of coordinates may define the `propagate` with `true`. Multiple such definitions will produce a composition error.

3. Any number of instances of coordinates may provide the `propagate` argument with `false`.

## Examples

### Propagating a specific description

```graphql theme={"system"}
# subgraph A
"""
A.Query description
"""
type Query @openfed__configureDescription {
  one: String!
}
```

```graphql theme={"system"}
# subgraph A
"""
B.Query description 1234
"""
type Query {
  two: String!
}
```

```graphql theme={"system"}
# federated graph
"""
A.Query description
"""
type Query {
  one: String!
  two: String!
}
```

### Hiding a specific description

```graphql theme={"system"}
# subgraph A
"""
A.Query description
"""
type Query @openfed__configureDescription(propagate: false) {
  one: String!
}
```

```graphql theme={"system"}
# subgraph A
"""
B.Query description 1234
"""
type Query {
  two: String!
}
```

```graphql theme={"system"}
# federated graph
"""
B.Query description 1234
"""
type Query {
  one: String!
  two: String!
}
```

### Hiding all descriptions

```graphql theme={"system"}
# subgraph A
"""
A.Query description
"""
type Query @openfed__configureDescription(propagate: false) {
  one: String!
  two: String!
}
```

```graphql theme={"system"}
# subgraph A
"""
B.Query description 1234
"""
type Query @openfed__configureDescription(propagate: false) {
  two: String!
}
```

```graphql theme={"system"}
# federated graph
type Query {
  one: String!
  two: String!
}
```

### Setting and propagating a description on an extension type

```graphql theme={"system"}
# subgraph A
extend type Query @openfed__configureDescription(
  descriptionOverride: "A.Query extension description"
) {
  one: String!
}
```

```graphql theme={"system"}
# subgraph A
"""
B.Query description 1234
"""
type Query {
  two: String!
}
```

```graphql theme={"system"}
# federated graph
"""
A.Query extension description
"""
type Query {
  one: String!
  two: String!
}
```

### Overriding and propagating a description

```graphql theme={"system"}
# subgraph A
"""
A.Query internal description
"""
type Query @openfed__configureDescription(
  descriptionOverride: "A.Query external description"
) {
  one: String!
}
```

```
# subgraph A
"""
B.Query description 1234
"""
type Query {
  two: String!
}
```

```graphql theme={"system"}
# federated graph
"""
A.Query external description
"""
type Query {
  one: String!
  two: String!
}
```
