Skip to content

Commit

Permalink
add missing RELEASE.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
bellini666 committed Feb 9, 2025
1 parent 45720b6 commit 96b3724
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Release type: patch

This release adjusts the schema printer to avoid printing a schema directive
value set to `UNSET` as `""` (empty string).

For example, the following:

```python
@strawberry.input
class FooInput:
a: str | None = strawberry.UNSET
b: str | None = strawberry.UNSET


@strawberry.schema_directive(locations=[Location.FIELD_DEFINITION])
class FooDirective:
input: FooInput


@strawberry.type
class Query:
@strawberry.field(directives=[FooDirective(input=FooInput(a="aaa"))])
def foo(self, info) -> str: ...
```

Would previously print as:

```graphql
directive @fooDirective(
input: FooInput!
optionalInput: FooInput
) on FIELD_DEFINITION

type Query {
foo: String! @fooDirective(input: { a: "aaa", b: "" })
}

input FooInput {
a: String
b: String
}
```

Now it will be correctly printed as:

```graphql
directive @fooDirective(
input: FooInput!
optionalInput: FooInput
) on FIELD_DEFINITION

type Query {
foo: String! @fooDirective(input: { a: "aaa" })
}

input FooInput {
a: String
b: String
}
```

0 comments on commit 96b3724

Please sign in to comment.