Strawberry-graphql

Latest version: v0.229.1

Safety actively analyzes 629788 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 37 of 119

0.149.1

Not secure
--------------------

This release improves the performance of rich exceptions on custom scalars
by changing how frames are fetched from the call stack.
Before the change, custom scalars were using a CPU intensive call to the
`inspect` module to fetch frame info which could lead to serious CPU spikes.

Contributed by [Paulo Amaral](https://github.com/paulopaixaoamaral) via [PR #2390](https://github.com/strawberry-graphql/strawberry/pull/2390/)

0.149.0

Not secure
--------------------

This release does some internal refactoring of the HTTP views, hopefully it
doesn't affect anyone. It mostly changes the status codes returned in case of
errors (e.g. bad JSON, missing queries and so on).

It also improves the testing, and adds an entirely new test suite for the HTTP
views, this means in future we'll be able to keep all the HTTP views in sync
feature-wise.

Contributed by [Patrick Arminio](https://github.com/patrick91) via [PR #1840](https://github.com/strawberry-graphql/strawberry/pull/1840/)

0.148.0

Not secure
--------------------

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.

Contributed by [Patrick Arminio](https://github.com/patrick91) via [PR #2388](https://github.com/strawberry-graphql/strawberry/pull/2388/)

0.147.0

Not secure
--------------------

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.

Contributed by [Patrick Arminio](https://github.com/patrick91) via [PR #2272](https://github.com/strawberry-graphql/strawberry/pull/2272/)

0.146.0

Not secure
--------------------

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.

Contributed by [Patrick Arminio](https://github.com/patrick91) via [PR #2273](https://github.com/strawberry-graphql/strawberry/pull/2273/)

0.145.0

Not secure
--------------------

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:

bash
pip install "strawberry-graphql[cli]"


Contributed by [Patrick Arminio](https://github.com/patrick91) via [PR #2027](https://github.com/strawberry-graphql/strawberry/pull/2027/)

Page 37 of 119

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.