@@ -5856,26 +5856,15 @@ ERROR
5856
5856
- Let {fieldArg } be the string value of the `field ` argument of the
5857
5857
`@require ` directive on {argument }.
5858
5858
- Let {parsedFieldArg } be the parsed selection map from {fieldArg }.
5859
- - {ValidateSelectionMap (parsedFieldArg, declaringType, otherSchemas)} must
5860
- be true .
5861
-
5862
- ValidateSelectionMap (selectionMap, declaringType, schemas):
5863
-
5864
- - For each {selection } in {selectionMap }:
5865
- - Let {possibleTypes } be the set of all possible types for {declaringType } in
5866
- {schemas }.
5867
- - Let {field } be the first field selected by {selection } on any
5868
- {possibleTypes }.
5869
- - If no {field } is found
5870
- - return false
5871
- - Let {fieldType } be the type of {field}.
5872
- - If {fieldType } is not a scalar type
5873
- - Let {subSelectionSet } be the selection set of {selection }
5874
- - If {subSelectionSet } is empty
5875
- - return false
5876
- - If {ValidateSelectionMap (subSelectionSet, fieldType, schemas)} is false
5877
- - return false
5878
- - return true
5859
+ - The parsed selection map {parsedFieldArg } must satisfy the validation
5860
+ rules defined in Appendix A , Section 6.3, using :
5861
+ - {declaringType } as the initial root type .
5862
+ - The combined schema context formed by the union of {otherSchemas} as the
5863
+ schema context except all fields marked as `@internal `
5864
+ - Validation succeeds if each required field selection path can be
5865
+ resolved across this combined schema context. Individual fields in the
5866
+ selection may exist in different schemas; it is not required that all
5867
+ fields referenced by {parsedFieldArg} reside within a single schema .
5879
5868
5880
5869
**Explanatory Text**
5881
5870
@@ -5934,8 +5923,9 @@ type Book {
5934
5923
}
5935
5924
```
5936
5925
5937
- In the following counter -example , the `@require ` directive references a field from itself
5938
- (`Book.size`) which is not allowed . This results in a `REQUIRE_INVALID_FIELDS ` error .
5926
+ In the following counter -example , the `@require ` directive references a field
5927
+ from itself (`Book.size`) which is not allowed . This results in a
5928
+ `REQUIRE_INVALID_FIELDS ` error .
5939
5929
5940
5930
```graphql counter -example
5941
5931
type Book {
0 commit comments