Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Input Field Types mergeable validation rule #45

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

michaelstaib
Copy link
Member

No description provided.

spec/Section 4 -- Composition.md Outdated Show resolved Hide resolved
spec/Section 4 -- Composition.md Outdated Show resolved Hide resolved
spec/Section 4 -- Composition.md Outdated Show resolved Hide resolved
}
```

Fields are also consodered mergable if they have different nullability defined
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Fields are also consodered mergable if they have different nullability defined
Fields are also considered mergeable if they have different nullability defined.

```

Fields are also consodered mergable if they have different nullability defined
across Here, the field `tags` in `Input1` is a list type with compatible inner
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
across Here, the field `tags` in `Input1` is a list type with compatible inner
Here, the field `tags` in `Input1` is a list type with compatible inner

```

In this counter-example, the field `field` in `Input1` has incompatible types
(`String` and `DateTime`), making them not mergeable:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(`String` and `DateTime`), making them not mergeable:
(`String` and `DateTime`), making them non-mergeable:

Comment on lines +80 to +81
In this example, the field `field` on `Input1` is not mergable as the field has
different named types across (`String` and `DateTime`) source schemas:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In this example, the field `field` on `Input1` is not mergable as the field has
different named types across (`String` and `DateTime`) source schemas:
In this example, the field `field` on `Input1` is not mergeable as the field has
different named types (`String` and `DateTime`) across source schemas:

@michaelstaib
Copy link
Member Author

We need to explain how the nullability merges ...

- Given each pair of members {fieldA} and {fieldB} in {fields}:
- Let {typeA} be the type of {fieldA}.
- Let {typeB} be the type of {fieldB}.
- {SameTypeShape(typeA, typeB)} must be true.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants