Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
yaacovCR committed Sep 4, 2024
1 parent 2ef3ded commit 7cb1898
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions spec/Section 5 -- Validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2005,38 +2005,6 @@ fragment fragmentArgUnused($atOtherHomes: Boolean) on Dog {
This document is invalid: fragment `fragmentArgUnused` defines a fragment
variable `$atOtherHomes`, but this variable is not used within this fragment.

### All Fragment Arguments Used

**Formal Specification**

- For every {fragment} in the document:
- Let {arguments} be the variables defined by that {fragment}.
- Each {argument} in {variables} must be used by at least once fragment spread
in either the scope of an operation included within the document or any
fragment transitively referenced by any operation.

**Explanatory Text**

All arguments defined by a fragment must be used at least once within the
document.

For example, the following is invalid:

```graphql counter-example
query queryWithFragmentArgUnused {
dog {
...fragmentArgUnused
}
}

fragment fragmentArgUnused($atOtherHomes: Boolean = true) on Dog {
isHouseTrained(atOtherHomes: $atOtherHomes)
}
```

This document is invalid: fragment `fragmentArgUnused` defines a fragment
argument `$atOtherHomes`, but this is not used within the document.

### All Variable Usages Are Allowed

**Formal Specification**
Expand Down

0 comments on commit 7cb1898

Please sign in to comment.