This release changes the get_context, get_root_value and process_result
methods of the Flask async view to be async functions. This allows you to use
async code in these methods.
π 0.147.0
This release introduces a encode_json method on all the HTTP integrations.
This method allows to customize the encoding of the JSON response. By default we
use json.dumps but you can override this method to use a different encoder.
It also deprecates json_encoder and json_dumps_params in the Django and
Sanic views, encode_json should be used instead.
π 0.146.0
This release updates the Sanic integration and includes some breaking changes.
You might need to update your code if you are customizing get_context or
process_result
get_context
get_context now receives the request as the first argument and the response as
the second argument.
process_result
process_result is now async and receives the request and the GraphQL execution
result.
This change is needed to align all the HTTP integrations and reduce the amount
of code needed to maintain. It also makes the errors consistent with other
integrations.
It also brings a new feature and it allows to customize the HTTP status code
by using info.context["response"].status_code = YOUR_CODE.
It also removes the upper bound on the Sanic version, so you can use the latest
version of Sanic with Strawberry.
π 0.145.0
This release introduced improved errors! Now, when you have a syntax error in
your code, you'll get a nice error message with a line number and a pointer to
the exact location of the error. β¨
This is a huge improvement over the previous behavior, which was providing a
stack trace with no clear indication of where the error was. π
You can enable rich errors by installing Strawberry with the cli extra:
This release changes the get_context, get_root_value and process_result
methods of the Flask async view to be async functions. This allows you to use
async code in these methods.
This release introduces a encode_json method on all the HTTP integrations.
This method allows to customize the encoding of the JSON response. By default we
use json.dumps but you can override this method to use a different encoder.
It also deprecates json_encoder and json_dumps_params in the Django and
Sanic views, encode_json should be used instead.
This release updates the Sanic integration and includes some breaking changes.
You might need to update your code if you are customizing get_context or
process_result
get_context
get_context now receives the request as the first argument and the response as
the second argument.
process_result
process_result is now async and receives the request and the GraphQL execution
result.
This change is needed to align all the HTTP integrations and reduce the amount
of code needed to maintain. It also makes the errors consistent with other
integrations.
It also brings a new feature and it allows to customize the HTTP status code
by using info.context["response"].status_code = YOUR_CODE.
It also removes the upper bound on the Sanic version, so you can use the latest
version of Sanic with Strawberry.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps strawberry-graphql from 0.133.5 to 0.148.0.
Release notes
Sourced from strawberry-graphql's releases.
... (truncated)
Changelog
Sourced from strawberry-graphql's changelog.
... (truncated)
Commits
c8f44e5
Release π 0.148.0d4a9b4d
Update Flask http view (#2388)9b8449a
Bump certifi from 2022.9.24 to 2022.12.7 (#2386)5ba9983
Bump pytest-asyncio from 0.20.2 to 0.20.3 (#2387)d041937
Release π 0.147.05f44c2b
Change json_encoder to be a function, add it to all integrations (#2272)0bf116a
Fix missing parameter in docs0f6b4a0
[pre-commit.ci] pre-commit autoupdate (#2383)fa6cc85
Release π 0.146.02192f3a
Refactor sanic view (#2273)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)