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 REQUIRED_ARGUMENT_MISSING_IN_SOME_SCHEMA #101

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

Conversation

PascalSenn
Copy link
Contributor

No description provided.

spec/Section 4 -- Composition.md Show resolved Hide resolved
spec/Section 4 -- Composition.md Show resolved Hide resolved
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
spec/Section 4 -- Composition.md Show resolved Hide resolved

**Error Code:**

`REQUIRED_ARGUMENT_MISSING_IN_SOME_SCHEMA`
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we try to keep the error codes <~35 characters?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe REQUIRED_FIELD_ARGUMENT_MISSING?


**Error Code:**

`REQUIRED_ARGUMENT_MISSING_IN_SOME_SCHEMA`
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe REQUIRED_FIELD_ARGUMENT_MISSING?


**Formal Specification:**

- Let {typeNames} be the set of all object and interface types names from all
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Let {typeNames} be the set of all object and interface types names from all
- Let {typeNames} be the set of all object and interface type names from all


When merging a field definition across multiple schemas, any argument that is
non-null (i.e., “required”) in one schema must appear in all schemas that define
that field . In other words, arguments are effectively merged by intersection:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
that field . In other words, arguments are effectively merged by intersection:
that field. In other words, arguments are effectively merged by intersection:

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you not mean by union?

if an argument is considered required in any schema, then that same argument
must exist in every schema that contributes to the composite definition. If a
required argument is missing in one schema, there is no consistent way to define
that field or directive across schemas.
Copy link
Contributor

Choose a reason for hiding this comment

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

The spec doesn't mention directive arguments?

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.

Add pre-merge validation rule to ensure that there are no missing field arguments
2 participants