-
Notifications
You must be signed in to change notification settings - Fork 179
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
Federation Support - Description of custom directives breaks make_federated_schema #775
Comments
Thx @rafalp |
It feels like this Regex change would make parsing comments take forever (exponential?) |
What do you mean by would and it feels? Are you experiencing "forever"? 😄 |
Hey, sorry for the vagueness. |
I'd suggest to open a new issue, that targets the performance issue (as this issue is closed). Some closing thoughts: ariadne/ariadne/contrib/federation/utils.py Lines 58 to 65 in f37df14
ariadne/ariadne/contrib/federation/schema.py Lines 64 to 68 in f37df14
Maybe the true solution lies in removing
If one finds another way That being said, #736 also mentions this specific function. Maybe you can find some help there. |
I stumpled into a problem with the federation support while using custom directives.
It appears that
make_federated_schema
doesn't support custom directives if they have a description.The culprit is following function:
ariadne/ariadne/contrib/federation/utils.py
Lines 54 to 61 in ceee00c
It purges the directives from the schema but keeps the description in place.
This may lead to a violation of the GraphQL Syntax depending on which type definition come next.
The solution would be to extend the regex used to capture the directive definition so that it includes block-strings and single-line-strings.
ariadne/ariadne/contrib/federation/utils.py
Lines 17 to 32 in ceee00c
The text was updated successfully, but these errors were encountered: