-
-
Notifications
You must be signed in to change notification settings - Fork 549
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
Extensions Added Twice When Custom Directives Are Present #3776
Labels
bug
Something isn't working
Comments
Hey @doney-dkp , nice catch there! Do you want to try to submit a PR to fix that? |
@bellini666 sure, happy to do |
11 tasks
Hey @bellini666 please have a look |
patrick91
added a commit
that referenced
this issue
Feb 13, 2025
#3783) * Fix extentions added twice with user diectives * Add RELEASE.md * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update strawberry/schema/schema.py * Update strawberry/schema/schema.py --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Patrick Arminio <[email protected]>
Fixed by #3783 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the Bug
When custom directives are added, extensions are appended twice in the get_extensions function in the schema.py file.
Issue
In the following code:
https://github.com/strawberry-graphql/strawberry/blob/main/strawberry/schema/schema.py
line 299
The extensions list already contains self.extensions, and then extend(self.extensions) adds them again, causing duplicates.
Example Reproduction
Expected Behavior
Extensions should not be duplicated when custom directives are present.
Suggested Fix
Modify the logic to avoid adding self.extensions twice.
remove line
extensions.extend(self.extensions)
The text was updated successfully, but these errors were encountered: