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

Adjust to deprecations for graphql_core v.3.2 #2894

Merged
merged 6 commits into from
Jun 27, 2023

Conversation

kristjanvalur
Copy link
Contributor

@kristjanvalur kristjanvalur commented Jun 27, 2023

the format_error() function to turn GraphQLError into GraphQLFormattedError is deprecated
for graphql-core 3.2 and will be removed for version 3.3.

graphql.subscription module is deprecated, its contents moved to graphql.execution

No other deprecated features seem to be in use in strawberry.

Current version in strawberry is "~3.2.0"

Description

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

Sorry, something went wrong.

@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #2894 (949cb3c) into main (e8a3ddc) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2894      +/-   ##
==========================================
- Coverage   96.37%   96.37%   -0.01%     
==========================================
  Files         207      207              
  Lines        8969     8966       -3     
  Branches     1648     1649       +1     
==========================================
- Hits         8644     8641       -3     
  Misses        206      206              
  Partials      119      119              

@kristjanvalur kristjanvalur changed the title Remove deprecated function for graphql_core v.3.2 Adjust to deprecations for graphql_core v.3.2 Jun 27, 2023
@kristjanvalur kristjanvalur marked this pull request as ready for review June 27, 2023 11:01
@botberry
Copy link
Member

botberry commented Jun 27, 2023

Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:


This release removes some usage of deprecated functions from GraphQL-core.


Here's the preview release card for twitter:

Here's the tweet text:

🆕 Release (next) is out! Thanks to @kristjanvalur for the PR 👏

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

Copy link
Member

@DoctorJohn DoctorJohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting Strawberry ready for graphql-core 3.3 @kristjanvalur. Straightforward yet super welcome changes!

@@ -250,7 +249,7 @@ async def get_result_source():
# Handle initial validation errors
if isinstance(result_source, GraphQLExecutionResult):
assert result_source.errors
payload = [format_graphql_error(result_source.errors[0])]
payload = [err.formatted for err in result_source.errors]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch 👍

RELEASE.md Outdated Show resolved Hide resolved
kristjanvalur and others added 3 commits June 27, 2023 13:49
Co-authored-by: Patrick Arminio <patrick.arminio@gmail.com>
@DoctorJohn DoctorJohn merged commit b48236b into strawberry-graphql:main Jun 27, 2023
@kristjanvalur kristjanvalur deleted the format_error branch June 27, 2023 17:19
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.

None yet

4 participants