-
-
Notifications
You must be signed in to change notification settings - Fork 544
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
Fix ParserCache Syntax Errors #3256
Fix ParserCache Syntax Errors #3256
Conversation
Hi, thanks for contributing to Strawberry 🍓! We noticed that this PR is missing a So as soon as this PR is merged, a release will be made 🚀. Here's an example of Release type: patch
Description of the changes, ideally with some examples, if adding a new feature. Release type can be one of patch, minor or major. We use semver, so make sure to pick the appropriate type. If in doubt feel free to ask :) Here's the tweet text:
|
for more information, see https://pre-commit.ci
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3256 +/- ##
==========================================
+ Coverage 96.36% 96.60% +0.23%
==========================================
Files 482 482
Lines 29952 29970 +18
Branches 3690 3695 +5
==========================================
+ Hits 28863 28952 +89
+ Misses 898 834 -64
+ Partials 191 184 -7 |
hi @imconnorngl! could you add a test for this? 😊 |
CodSpeed Performance ReportMerging #3256 will not alter performanceComparing Summary
|
Hi :) Added those, let me know if any of that is wrong! First time contributing here but just wanted to say it's a very very nice experience! One check is failing, I've probably done something wrong! Let me know if I need to fix anything :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is almost ready to go, the failing check is because we are missing a release file 😊
See this comment: #3256 (comment)
|
||
result = schema.execute_sync(query) | ||
|
||
assert result.errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we also assert the value of the error here? 😊
@strawberry.type | ||
class Query: | ||
@strawberry.field | ||
def hello(self) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def hello(self) -> str: | |
def hello(self) -> str: # pragma: no cover |
this should silence the warning below
After chatting with @imconnorngl we noticed that this issue can be fixed by #3217 so I pulled the test in there 😊 I'll close this PR, and make a pre-release :) |
Description
ParserCache does not catch SyntaxErrors in the GraphQL input.
Expected behaviour can be seen in strawberry.schema.execute.
Types of Changes
Issues Fixed or Closed by This PR
N/A
Checklist