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

Support extensions for subscriptions #2430

Conversation

nrbnlulu
Copy link
Member

@nrbnlulu nrbnlulu commented Jan 4, 2023

Description

Support extensions for subscriptions.

i.e:

def on_execute(self):
    #  This part is called before the async-generator yields
    yield
    #  This part is called after the async-generator yields

This PR follows #2428

Notes:

  • resolve Is not supported due to lack of support in graphql-core
    see this issue

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Documentation

Issues Fixed or Closed by This PR

closes #2097

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

…d to provide backward compat, and fix other tests.
…criptions

# Conflicts:
#	strawberry/schema/execute.py
…criptions

# Conflicts:
#	tests/schema/extensions/test_extensions.py
@codecov
Copy link

codecov bot commented Jan 4, 2023

Codecov Report

Merging #2430 (16015df) into main (3430d85) will increase coverage by 0.02%.
The diff coverage is 99.16%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2430      +/-   ##
==========================================
+ Coverage   96.30%   96.33%   +0.02%     
==========================================
  Files         184      184              
  Lines        7571     7714     +143     
  Branches     1394     1409      +15     
==========================================
+ Hits         7291     7431     +140     
- Misses        179      181       +2     
- Partials      101      102       +1     

@botberry
Copy link
Member

botberry commented Jan 4, 2023

Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:


Support Extensions on subscriptions
i.e:

def on_execute(self):
    #  This part is called before the async-generator yields
    yield
    #  This part is called after the async-generator yields

Here's the preview release card for twitter:

Here's the tweet text:

🆕 Release (next) is out! Thanks to ניר for the PR 👏

Get it here 👉 https://github.com/strawberry-graphql/strawberry/releases/tag/(next)

@patrick91
Copy link
Member

@nrbnlulu would you have time to update this PR? :D

@nrbnlulu nrbnlulu closed this Jul 2, 2024
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

Successfully merging this pull request may close these issues.

Extenstions support for subscriptions.
3 participants