Skip to content

Commit

Permalink
Release 🍓 0.164.0
Browse files Browse the repository at this point in the history
  • Loading branch information
botberry committed Mar 14, 2023
1 parent 3a043ca commit 0b34c71
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 40 deletions.
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,50 @@
CHANGELOG
=========

0.164.0 - 2023-03-14
--------------------

This release introduces a breaking change to make pydantic default behavior consistent with normal strawberry types.
This changes the schema generated for pydantic types, that are required, and have default values.
Previously pydantic type with a default, would get converted to a strawberry type that is not required.
This is now fixed, and the schema will now correctly show the type as required.

```python
import pydantic
import strawberry


class UserPydantic(pydantic.BaseModel):
name: str = "James"


@strawberry.experimental.pydantic.type(UserPydantic, all_fields=True)
class User:
...


@strawberry.type
class Query:
a: User = strawberry.field()

@strawberry.field
def a(self) -> User:
return User()
```
The schema is now
```
type Query {
a: User!
}
type User {
name: String! // String! rather than String previously
}
```

Contributed by [James Chua](https://github.com/thejaminator) via [PR #2623](https://github.com/strawberry-graphql/strawberry/pull/2623/)


0.163.2 - 2023-03-14
--------------------

Expand Down
39 changes: 0 additions & 39 deletions RELEASE.md

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "strawberry-graphql"
packages = [ { include = "strawberry" } ]
version = "0.163.2"
version = "0.164.0"
description = "A library for creating GraphQL APIs"
authors = ["Patrick Arminio <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 0b34c71

Please sign in to comment.