-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Docs improvement Subscriptions #376
Docs improvement Subscriptions #376
Conversation
for more information, see https://pre-commit.ci
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #376 +/- ##
==========================================
- Coverage 88.00% 87.39% -0.61%
==========================================
Files 33 35 +2
Lines 2976 3023 +47
==========================================
+ Hits 2619 2642 +23
- Misses 357 381 +24
☔ View full report in Codecov by Sentry. |
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.
Very nice in general! :)
Co-authored-by: Thiago Bellini Ribeiro <[email protected]>
Co-authored-by: Thiago Bellini Ribeiro <[email protected]>
Co-authored-by: Thiago Bellini Ribeiro <[email protected]>
Co-authored-by: Thiago Bellini Ribeiro <[email protected]>
for more information, see https://pre-commit.ci
|
Co-authored-by: Thiago Bellini Ribeiro <[email protected]>
Co-authored-by: Thiago Bellini Ribeiro <[email protected]>
Co-authored-by: Thiago Bellini Ribeiro <[email protected]>
for more information, see https://pre-commit.ci
…phql-django into subscriptions
for more information, see https://pre-commit.ci
Co-authored-by: Thiago Bellini Ribeiro <[email protected]>
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.
Almost there :)
@sdobbelaere I just solved the remaining pyright issues for you. If the tests are passing fine, is there anything else missing from this or can it be merged? |
Thank you for the help, much appreciated. Why did I add this? Running tests needs access to a user in my case, this allows to construct a simple context when running tests like so: from django.contrib.auth import get_user_model
from MyProject.schemas import schema
user = get_user_model().objects.last()
dummy_context = {'is_test_mode': True, 'user': user}
resp = schema.execute_sync(query=query, context_value=dummy_context) Happy to add it to the docs. |
As I mentioned there, I don't like that approach very much, specially because we have a way for forcing a user into the request: https://github.com/strawberry-graphql/strawberry-graphql-django/blob/main/strawberry_django/test/client.py#L75 You can see it being used in here for example: https://github.com/strawberry-graphql/strawberry-graphql-django/blob/main/tests/test_permissions.py#L49 |
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.
Just a small nitpick and it should be good to merge :)
Thanks for taking the time to adjust everything I asked
yw :) |
As referred to in issue #375 some improved guidance on getting subscriptions running including the missing pieces related to the test-server.