Strawberry-graphql

Latest version: v0.235.0

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

Scan your dependencies

Page 56 of 122

0.114.0

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

Improve schema directives typing and printing after latest refactor.

- Support for printing schema directives for non-scalars (e.g. types) and null values.
- Also print the schema directive itself and any extra types defined in it
- Fix typing for apis expecting directives (e.g. `strawberry.field`, `strawberry.type`, etc)
to expect an object instead of a `StrawberrySchemaDirective`, which is now an internal type.

Contributed by [Thiago Bellini Ribeiro](https://github.com/bellini666) via [PR #1723](https://github.com/strawberry-graphql/strawberry/pull/1723/)

0.113.0

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

This release adds support for Starlette 0.18 to 0.20

It also removes upper bound dependencies limit for starlette,
allowing you to install the latest version without having to
wait for a new release of Strawberry

Contributed by [Timothy Pansino](https://github.com/TimPansino) via [PR #1594](https://github.com/strawberry-graphql/strawberry/pull/1594/)

0.112.0

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

This release adds a new flask view to allow for aysnc dispatching of requests.

This is especially useful when using dataloaders with flask.

python
from strawberry.flask.views import AsyncGraphQLView

...

app.add_url_rule(
"/graphql",
view_func=AsyncGraphQLView.as_view("graphql_view", schema=schema, **kwargs),
)


Contributed by [Scott Weitzner](https://github.com/scottweitzner) via [PR #1907](https://github.com/strawberry-graphql/strawberry/pull/1907/)

0.111.2

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

This release fixes resolvers using functions with generic type variables raising a `MissingTypesForGenericError` error.

For example a resolver factory like the below can now be used:

python
import strawberry
from typing import Type, TypeVar

T = TypeVar("T") or TypeVar("T", bound=StrawberryType) etc


def resolver_factory(strawberry_type: Type[T]):
def resolver(id: strawberry.ID) -> T:
some actual logic here
return strawberry_type(...)

return resolver


Contributed by [Tim OSullivan](https://github.com/invokermain) via [PR #1891](https://github.com/strawberry-graphql/strawberry/pull/1891/)

0.111.1

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

Rename internal variable `custom_getter` in FastAPI router implementation.

Contributed by [Gary Donovan](https://github.com/garyd203) via [PR #1875](https://github.com/strawberry-graphql/strawberry/pull/1875/)

0.111.0

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

This release adds support for Apollo Federation 2 directives:
- shareable
- tag
- override
- inaccessible

This release does **not** add support for the link directive.

This release updates the key directive to align with Apollo Federation 2 updates.

See the below code snippet and/or the newly-added test cases for examples on how to use the new directives.
The below snippet demonstrates the override directive.
python
import strawberry
from typing import List


strawberry.interface
class SomeInterface:
id: strawberry.ID


strawberry.federation.type(keys=["upc"], extend=True)
class Product(SomeInterface):
upc: str = strawberry.federation.field(external=True, override=["mySubGraph"])


strawberry.federation.type
class Query:
strawberry.field
def top_products(self, first: int) -> List[Product]:
return []


schema = strawberry.federation.Schema(query=Query)


should return:

graphql
extend type Product implements SomeInterface key(fields: "upc", resolvable: "True") {
id: ID!
upc: String! external override(from: "mySubGraph")
}

type Query {
_service: _Service!
_entities(representations: [_Any!]!): [_Entity]!
topProducts(first: Int!): [Product!]!
}

interface SomeInterface {
id: ID!
}

scalar _Any

union _Entity = Product

type _Service {
sdl: String!
}


Contributed by [Matt Skillman](https://github.com/mtskillman) via [PR #1874](https://github.com/strawberry-graphql/strawberry/pull/1874/)

Page 56 of 122

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.