Skip to content

Schema directive visitor in federated schema broken in 5.x #1486

Closed
@tlivings

Description

@tlivings

Previously, applying:

SchemaDirectiveVisitor.visitSchemaDirectives(federatedSchema, schemaDirectives);

Would allow custom directives to be applied to a federated schema.

In 5.0, this fails with an exception:

TypeError: Cannot read property 'concat' of undefined

Due to this line:

directiveNodes = directiveNodes.concat(extensionASTNode.directives);

In this case, directiveNodes is undefined because for the Extension type, type.astNode is not undefined but type.astNode.directives is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions