Skip to content

Consider rewriting the algorithm for "Require Invalid Fields" to work with the composite schema #184

Open
@glen-84

Description

@glen-84

The documented algorithm is quite complex, requiring that the FieldSelectionMap validation be applied to a set of schemas, excluding the current.

I do wonder how feasible the spec algorithm is though:

The combined schema context formed by the union of otherSchemas as the schema context except all fields marked as @internal

It's not like we'd actually compose the other schemas together, that would be far too expensive. This means having some kind of visitor that repeatedly scans across multiple schemas while resolving selected fields in the FSM – one field could be in more than one schema, so you'd have to follow multiple paths, etc. It seems unnecessarily complicated?

What do you think about rewriting the algorithm to work with the composite schema?

Something like, for each source schema, find all require directives, and validate each against the composite schema.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions