Class: GraphQL::Stitching::Composer::ValidateInterfaces
- Inherits:
-
BaseValidator
- Object
- BaseValidator
- GraphQL::Stitching::Composer::ValidateInterfaces
- Defined in:
- lib/graphql/stitching/composer/validate_interfaces.rb
Instance Method Summary collapse
Instance Method Details
#perform(supergraph, composer) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/graphql/stitching/composer/validate_interfaces.rb', line 7 def perform(supergraph, composer) # @todo # Validate all supergraph interface fields # match possible types in all locations... # - Traverse supergraph types (supergraph.types) # - For each interface (.kind.interface?), get possible types (Util.get_possible_types) # - For each possible type, traverse type candidates (composer.subschema_types_by_name_and_location) # - For each type candidate, compare interface fields to type candidate fields # - For each type candidate field that matches an interface field... # - Named types must match # - List structures must match # - Nullabilities must be >= interface field # - It's OKAY if a type candidate does not implement the full interface end |