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

Extract operation name and type from execution context #1286

Merged
merged 7 commits into from
Dec 7, 2021

Conversation

jkimbo
Copy link
Member

@jkimbo jkimbo commented Oct 1, 2021

Description

Add properties to ExecutionContext to extract the operation name and type from the graphql document.

Types of Changes

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

Issues Fixed or Closed by This PR

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).

@botberry
Copy link
Member

botberry commented Oct 1, 2021

Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:


This release operation_type to the ExecutionContext type that is available
in extensions. It also gets the operation_name from the query if one isn't
provided by the client.


Here's the preview release card for twitter:

Here's the tweet text:

🆕 Release (next) is out! Thanks to Jonathan Kim for the PR 👏

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

@codecov
Copy link

codecov bot commented Oct 1, 2021

Codecov Report

Merging #1286 (b60b6f9) into main (6f7b5d2) will increase coverage by 0.03%.
The diff coverage is 97.87%.

@@            Coverage Diff             @@
##             main    #1286      +/-   ##
==========================================
+ Coverage   98.09%   98.12%   +0.03%     
==========================================
  Files         118      127       +9     
  Lines        4039     4379     +340     
  Branches      579      743     +164     
==========================================
+ Hits         3962     4297     +335     
- Misses         41       42       +1     
- Partials       36       40       +4     

strawberry/types/execution.py Outdated Show resolved Hide resolved
strawberry/types/execution.py Outdated Show resolved Hide resolved
strawberry/types/execution.py Outdated Show resolved Hide resolved
strawberry/schema/execute.py Outdated Show resolved Hide resolved
@jkimbo
Copy link
Member Author

jkimbo commented Oct 10, 2021

@BryceBeagle @patrick91 this is ready for review again.

strawberry/types/execution.py Outdated Show resolved Hide resolved
@jkimbo jkimbo force-pushed the add-operation-name-type branch from c93384b to 505b13a Compare October 31, 2021 15:56
@jkimbo jkimbo requested a review from BryceBeagle October 31, 2021 15:57
RELEASE.md Outdated Show resolved Hide resolved
@patrick91 patrick91 deleted the add-operation-name-type branch December 7, 2021 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants