Skip to content

Commit

Permalink
Cleanup rule
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalSenn committed Nov 7, 2024
1 parent 67f3342 commit fcbf6f0
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions spec/Section 4 -- Composition.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,21 @@ run in sequence to produce the composite execution schema.

OUTPUT_FIELD_ARGUMENT_TYPES_NOT_MERGEABLE

**Severity**

ERROR

**Formal Specification**

- Let {fieldsByName} be a map of field lists where the key is the name of a field and the value is a list of fields from mergeable types from different source schemas with the same name.
- For each {fields} in {fieldsByName}
- If {FieldsInSetCanMerge(fields)} must be true.
- Let {typeNames} be the set of all output type names from all source schemas.
- For each {typeName} in {typeNames}
- Let {types} be the set of all types with the name {typeName} from all source
schemas.
- Let {fieldNames} be the set of all field names from all {types}.
- For each {fieldName} in {fieldNames}
- Let {fields} be the set of all fields with the name {fieldName} from all
{types}.
- {FieldsAreMergeable(fields)} must be true.

FieldsAreMergeable(fields):

Expand All @@ -41,7 +51,8 @@ ArgumentsAreMergeable(fieldA, fieldB):

**Explanatory Text**

Fields on mergeable objects or interfaces that have the same name are considered semantically equivalent and mergeable when they have mergeable argument types.
Fields on mergeable objects or interfaces that have the same name are considered
semantically equivalent and mergeable when they have mergeable argument types.

```graphql example
type User {
Expand Down

0 comments on commit fcbf6f0

Please sign in to comment.