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

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

Closed
tlivings opened this issue May 18, 2020 · 3 comments
Closed

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

tlivings opened this issue May 18, 2020 · 3 comments

Comments

@tlivings
Copy link
Contributor

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.

yaacovCR added a commit that referenced this issue May 18, 2020
stash on extensions instead of annotating info argument

closes #1486
ardatan pushed a commit that referenced this issue May 19, 2020
* remove dead type

* rename mergeInfo to stitchingInfo

stash on extensions instead of annotating info argument

closes #1486
yaacovCR added a commit that referenced this issue May 19, 2020
in --some-- codebase locations!

closes #1486
@yaacovCR
Copy link
Collaborator

#1490 references this issue in error, fix should be in #1506

yaacovCR added a commit that referenced this issue May 19, 2020
in --some-- codebase locations!

closes #1486
@yaacovCR
Copy link
Collaborator

Not sure if you are ready for this yet, but you should be able to test fix with new separate graphql-tools packages:

@graphql-tools/schema
@graphql-tools/utils

via canary tag. Would be extremely helpful to us!

Example project using new scoped packages: https://github.com/yaacovCR/apollo-stitcher/blob/master/package.json

v6 API in progress: https://www.graphql-tools.com/docs/introduction

@yaacovCR
Copy link
Collaborator

Closed by #1419.

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

No branches or pull requests

2 participants