This repository has been archived by the owner on Dec 23, 2023. It is now read-only.
Update dependency strawberry-graphql to ^0.132.0 #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^0.95.1
->^0.132.0
Release Notes
strawberry-graphql/strawberry
v0.132.1
Compare Source
Improve resolving performance by avoiding extra calls for basic fields.
This change improves performance of resolving a query by skipping
Info
creation and permission checking for fields that don't have a resolver
or permission classes. In local benchmarks it improves performance of large
results by ~14%.
Contributed by Jonathan Kim via PR #2194
v0.132.0
Compare Source
Support storing metadata in strawberry fields.
Contributed by Paulo Costa via PR #2190
v0.131.5
Compare Source
Fixes false positives with the mypy plugin.
Happened when
to_pydantic
was called on a type that was convertedpydantic with all_fields=True.
Also fixes the type signature when
to_pydantic
is defined by the user.v0.131.4
Compare Source
This release updates the mypy plugin and the typing for Pyright to treat all
strawberry fields as keyword-only arguments. This reflects a previous change to
the Strawberry API.
Contributed by Paulo Costa via PR #2191
v0.131.3
Compare Source
Bug fix: Do not force kw-only=False in fields specified with strawberry.field()
Contributed by Paulo Costa via PR #2189
v0.131.2
Compare Source
This release fixes a small issue that might happen when
uploading files and not passing the operations object.
Contributed by Patrick Arminio via PR #2192
v0.131.1
Compare Source
Fix warnings during unit tests for Sanic's upload.
Otherwise running unit tests results in a bunch of warning like this:
Contributed by Paulo Costa via PR #2178
v0.131.0
Compare Source
This release improves the dataloader class with new features:
Contributed by Paulo Costa via PR #2149
v0.130.4
Compare Source
This release adds improved support for Pyright and Pylance, VSCode default
language server for Python.
Using
strawberry.type
,strawberry.field
,strawberry.input
andstrawberry.enum
will now be correctly recognized by Pyright and Pylance andwon't show errors.
Contributed by Patrick Arminio via PR #2172
v0.130.3
Compare Source
Fix invalid deprecation warning issued on arguments annotated
by a subclassed
strawberry.types.Info
.Thanks to @ThirVondukr for the bug report!
Example:
Contributed by San Kilkis via PR #2137
v0.130.2
Compare Source
This release fixes the conversion of generic aliases when
using pydantic.
Contributed by Silas Sewell via PR #2152
v0.130.1
Compare Source
Fix version parsing issue related to dev builds of Mypy in
strawberry.ext.mypy_plugin
Contributed by San Kilkis via PR #2157
v0.130.0
Compare Source
Convert Tuple and Sequence types to GraphQL list types.
Example:
Contributed by Jonathan Kim via PR #2164
v0.129.0
Compare Source
This release adds
strawberry.lazy
which allows you to define the type of thefield and its path. This is useful when you want to define a field with a type
that has a circular dependency.
For example, let's say we have a
User
type that has a list ofPost
and aPost
type that has aUser
:v0.128.0
Compare Source
This release changes how dataclasses are created to make use of the new
kw_only
argument in Python 3.10 so that fields without a default value can nowfollow a field with a default value. This feature is also backported to all other
supported Python versions.
More info: https://docs.python.org/3/library/dataclasses.html#dataclasses.dataclass
For example:
v0.127.4
Compare Source
This release fixes a bug in the subscription clean up when subscribing using the
graphql-transport-ws protocol, which could occasionally cause a 'finally'
statement within the task to not get run, leading to leaked resources.
Contributed by rjwills28 via PR #2141
v0.127.3
Compare Source
This release fixes a couple of small styling issues with
the GraphiQL explorer
Contributed by Patrick Arminio via PR #2143
v0.127.2
Compare Source
This release adds support for passing schema directives to
Schema(..., types=[])
. This can be useful if using a built-inschema directivethat's not supported by a gateway.
For example the following:
will print the following SDL:
Contributed by Patrick Arminio via PR #2140
v0.127.1
Compare Source
This release fixes an issue with the updated GraphiQL
interface.
Contributed by Doctor via PR #2138
v0.127.0
Compare Source
This release updates the built-in GraphiQL version to version 2.0,
which means you can now enjoy all the new features that come with the latest version!
Contributed by Matt Exact via PR #1889
v0.126.2
Compare Source
This release restricts the
backports.cached_property
dependency to only beinstalled when Python < 3.8. Since version 3.8
cached_property
is includedin the builtin
functools
. The code is updated to use the builtin versionwhen Python >= 3.8.
Contributed by ljnsn via PR #2114
v0.126.1
Compare Source
Keep extra discovered types sorted so that each schema printing is
always the same.
Contributed by Thiago Bellini Ribeiro via PR #2115
v0.126.0
Compare Source
This release adds support for adding descriptions to enum values.
Example
This produces the following schema
Contributed by Felipe Gonzalez via PR #2106
v0.125.1
Compare Source
This release hides
resolvable: True
in @keys directiveswhen using Apollo Federation 1, to preserve compatibility
with older Gateways.
Contributed by Patrick Arminio via PR #2099
v0.125.0
Compare Source
This release adds an integration with Django Channels. The integration will
allow you to use GraphQL subscriptions via Django Channels.
Contributed by Dan Sloan via PR #1407
v0.124.0
Compare Source
This release adds full support for Apollo Federation 2.0. To opt-in you need to
pass
enable_federation_2=True
tostrawberry.federation.Schema
, like in thefollowing example:
This release also improves type checker support for the federation.
Contributed by Patrick Arminio via PR #2047
v0.123.3
Compare Source
This release fixes a regression introduced in version 0.118.2 which was
preventing using circular dependencies in Strawberry django and Strawberry
django plus.
Contributed by Thiago Bellini Ribeiro via PR #2062
v0.123.2
Compare Source
This release adds support for priting custom enums used only on
schema directives, for example the following schema:
prints the following:
while previously it would omit the definition of the enum.
Contributed by Patrick Arminio via PR #2059
v0.123.1
Compare Source
This release adds support for priting custom scalar used only on
schema directives, for example the following schema:
prints the following:
while previously it would omit the definition of the scalar.
Contributed by Patrick Arminio via PR #2058
v0.123.0
Compare Source
This PR adds support for adding schema directives to the schema of
your GraphQL API. For printing the following schema:
will print the following:
Contributed by Patrick Arminio via PR #2054
v0.122.1
Compare Source
This release fixes that the AIOHTTP integration ignored the
operationName
of queryoperations. This behaviour is a regression introduced in version 0.107.0.
Contributed by Jonathan Ehwald via PR #2055
v0.122.0
Compare Source
This release adds support for printing default values for scalars like JSON.
For example the following:
will print the following schema:
Contributed by Patrick Arminio via PR #2048
v0.121.1
Compare Source
This release adds a backward compatibility layer with libraries
that specify a custom
get_result
.Contributed by Patrick Arminio via PR #2038
v0.121.0
Compare Source
This release adds support for overriding the default resolver for fields.
Currently the default resolver is
getattr
, but now you can change it to anyfunction you like, for example you can allow returning dictionaries:
Contributed by Patrick Arminio via PR #2037
v0.120.0
Compare Source
This release add a new
DatadogTracingExtension
that can be used to instrumentyour application with Datadog.
Contributed by Patrick Arminio via PR #2001
v0.119.2
Compare Source
Fixed edge case where
Union
types raised anUnallowedReturnTypeForUnion
error when returning the correct type from the resolver. This also improves
performance of StrawberryUnion's
_resolve_union_type
fromO(n)
toO(1)
inthe majority of cases where
n
is the number of types in the schema.For
example the below)
would previously raise the error when querying
two
asStrawberryUnion
wouldincorrectly determine that the resolver returns
Container[TypeOne]
.Contributed by Tim OSullivan via PR #2029
v0.119.1
Compare Source
An explanatory custom exception is raised when union of GraphQL input types is attempted.
Contributed by Dhanshree Arora via PR #2019
v0.119.0
Compare Source
This release changes when we add the custom directives extension, previously
the extension was always enabled, now it is only enabled if you pass custom
directives to
strawberry.Schema
.Contributed by bomtall via PR #2020
v0.118.2
Compare Source
This release adds an initial fix to make
strawberry.auto
work when usingfrom __future__ import annotations
.Contributed by Patrick Arminio via PR #1994
v0.118.1
Compare Source
Fixes issue where users without pydantic were not able to use the mypy plugin.
Contributed by James Chua via PR #2016
v0.118.0
Compare Source
You can now pass keyword arguments to
to_pydantic
v0.117.1
Compare Source
Allow to add alias to fields generated from pydantic with
strawberry.field(name="ageAlias")
.Contributed by Alex via PR #1986
v0.117.0
Compare Source
This release fixes an issue that required installing opentelemetry when
trying to use the ApolloTracing extension
Contributed by Patrick Arminio via PR #1977
v0.116.4
Compare Source
Fix regression caused by the new resolver argument handling mechanism
introduced in v0.115.0. This release restores the ability to use unhashable
default values in resolvers such as dict and list. See example below:
Thanks to @coady for the regression report!
Contributed by San Kilkis via PR #1985
v0.116.3
Compare Source
This release fixes the following error when trying to use Strawberry
with Apollo Federation:
Contributed by Patrick Arminio via PR #1988
v0.116.2
Compare Source
Reimplement
StrawberryResolver.annotations
property after removal in v0.115.Library authors who previously relied on the public
annotations
propertycan continue to do so after this fix.
Contributed by San Kilkis via PR #1990
v0.116.1
Compare Source
This release fixes a breaking internal error in mypy plugin for the following case.
strawberry.field()
orstrawberry.mutation()
now mypy returns an error with
"field()" or "mutation()" only takes keyword arguments
messagerather than an internal error.
Contributed by cake-monotone via PR #1987
v0.116.0
Compare Source
This release adds a link from generated GraphQLCore types to the Strawberry type
that generated them.
From a GraphQLCore type you can now access the Strawberry type by doing:
Contributed by Paulo Costa via PR #1766
v0.115.0
Compare Source
This release changes how we declare the
info
argument in resolvers and thevalue
argument in directives.Previously we'd use the name of the argument to determine its value. Now we use
the type annotation of the argument to determine its value.
Here's an example of how the old syntax works:
and here's an example of how the new syntax works:
This means that you can now use a different name for the
info
argument in yourresolver and the
value
argument in your directive.Here's an example that uses a custom name for both the value and the info
parameter in directives:
Note: the old way of passing arguments by name is deprecated and will be
removed in future releases of Strawberry.
Contributed by San Kilkis via PR #1713
v0.114.7
Compare Source
Allow use of implicit
Any
instrawberry.Private
annotated Generic types.For example the following is now supported:
See Issue #1938
for details.
Contributed by San Kilkis via PR #1939
v0.114.6
Compare Source
The federation decorator now allows for a list of additional arbitrary schema
directives extending the key/shareable directives used for federation.
Example Python:
Resulting GQL Schema:
Contributed by Jeffrey DeFond via PR #1945
v0.114.5
Compare Source
This release adds support in Mypy for using strawberry.mutation
while passing a resolver, the following now doesn't make Mypy return
an error:
Contributed by Etty via PR #1966
v0.114.4
Compare Source
This release fixes the type annotation of
Response.errors
used in theGraphQLTestClient
to be aList
ofGraphQLFormattedError
.Contributed by Etty via PR #1961
v0.114.3
Compare Source
This release fixes the type annotation of
Response.errors
used in theGraphQLTestClient
to be aList
ofGraphQLError
.Contributed by Etty via PR #1959
v0.114.2
Compare Source
This release fixes an issue in the
GraphQLTestClient
when using both variables and files together.Contributed by Etty via PR #1576
v0.114.1
Compare Source
Fix crash in Django's
HttpResponse.__repr__
by handlingstatus_code=None
inTemporalHttpResponse.__repr__
.Contributed by Daniel Hahler via PR #1950
v0.114.0
Compare Source
Improve schema directives typing and printing after latest refactor.
strawberry.field
,strawberry.type
, etc)to expect an object instead of a
StrawberrySchemaDirective
, which is now an internal type.Contributed by Thiago Bellini Ribeiro via PR #1723
v0.113.0
Compare Source
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 via PR #1594
v0.112.0
Compare Source
This release adds a new flask view to allow for aysnc dispatching of requests.
This is especially useful when using dataloaders with flask.
Contributed by Scott Weitzner via PR #1907
v0.111.2
Compare Source
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:
Contributed by Tim OSullivan via PR #1891
v0.111.1
Compare Source
Rename internal variable
custom_getter
in FastAPI router implementation.Contributed by Gary Donovan via PR #1875
v0.111.0
Compare Source
This release adds support for Apollo Federation 2 directives:
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.
should return:
Contributed by Matt Skillman via PR #1874
v0.110.0
Compare Source
This release adds support for passing a custom name to schema directives fields,
by using
strawberry.directive_field
.should return:
Contributed by Patrick Arminio via PR #1871
v0.109.1
Compare Source
This release adds support for Mypy 0.950
Contributed by dependabot via PR #1855
v0.109.0
Compare Source
Changed the location of
UNSET
fromarguments.py
tounset.py
.UNSET
can now also be imported directly fromstrawberry
. Deprecated theis_unset
method in favor of the builtinis
operator:Further more a new subsection to the docs was added explaining this.
Contributed by Dominique Garmier via PR #1813
v0.108.3
Compare Source
Fixes a bug when converting pydantic models with NewTypes in a List.
This no longers causes an exception.
Contributed by James Chua via PR #1770
v0.108.2
Compare Source
Fixes mypy type inference when using @strawberry.experimental.pydantic.input
and @strawberry.experimental.pydantic.interface decorators
Contributed by James Chua via PR #1832
v0.108.1
Compare Source
Refactoring: Move enum deserialization logic from convert_arguments to CustomGraphQLEnumType
Contributed by Paulo Costa via PR #1765
v0.108.0
Compare Source
Added support for deprecating Enum values with
deprecation_reason
while usingstrawberry.enum_value
instead of string definition.Contributed by Mateusz Sobas via PR #1720
v0.107.1
Compare Source
This release fixes an issue in the previous release where requests using query params did not support passing variable values. Variables passed by query params are now parsed from a string to a dictionary.
Contributed by Matt Exact via PR #1820
v0.107.0
Compare Source
This release adds support in all our integration for queries via GET requests.
This behavior is enabled by default, but you can disable it by passing
allow_queries_via_get=False
to the constructor of the integration of yourchoice.
For security reason only queries are allowed via
GET
requests.Contributed by Matt Exact via PR #1686
v0.106.3
Compare Source
Correctly parse Decimal scalar types to avoid floating point errors
Contributed by Marco Acierno via PR #1811
v0.106.2
Compare Source
Allow all data types in
Schema(types=[...])
Contributed by Paulo Costa via PR #1714
v0.106.1
Compare Source
This release fixes a number of problems with single-result-operations over
graphql-transport-ws
protocoloperation IDs now share the same namespace as streaming operations
meaning that they cannot be reused while the others are in operation
single-result-operations now run as tasks meaning that messages related
to them can be overlapped with other messages on the websocket.
single-result-operations can be cancelled with the
complete
message.IDs for single result and streaming result operations are now released
once the operation is done, allowing them to be re-used later, as well as
freeing up resources related to previous requests.
Contributed by Kristján Valur Jónsson via PR #1792
v0.106.0
Compare Source
This release adds an implementation of the
GraphQLTestClient
for theaiohttp
integration (in addition to the existingasgi
andDjango
support). It hides the HTTP request's details and verifies that there are no errors in the response (this behavior can be disabled by passingasserts_errors=False
). This makes it easier to test queries and makes your tests cleaner.If you are using
pytest
you can add a fixture inconftest.py
And use it everywhere in your tests
Contributed by Etty via PR #1604
v0.105.1
Compare Source
This release fixes a bug in the codegen that marked optional unions
as non optional.
Contributed by Patrick Arminio via PR #1806
v0.105.0
Compare Source
This release adds support for passing
json_encoder
andjson_dumps_params
to Sanic's view.Contributed by Patrick Arminio via PR #1797
v0.104.4
Compare Source
Allow use of
AsyncIterator
andAsyncIterable
generics to annotate returntype of subscription resolvers.
Contributed by San Kilkis via PR #1771
v0.104.3
Compare Source
Exeptions from handler functions in graphql_transport_ws are no longer
incorrectly caught and classified as message parsing errors.
Contributed by Kristján Valur Jónsson via PR #1761
v0.104.2
Compare Source
Drop support for Django < 3.2.
Contributed by Guillaume Andreu Sabater via PR #1787
v0.104.1
Compare Source
This release adds support for aliased fields when doing codegen.
Contributed by Patrick Arminio via PR #1772
v0.104.0
Compare Source
Add
is_auto
utility for checking if a type isstrawberry.auto
,considering the possibility of it being a
StrawberryAnnotation
oreven being used inside
Annotated
.Contributed by Thiago Bellini Ribeiro via PR #1721
v0.103.9
Compare Source
This release moves the console plugin for the codegen command
to be last one, allowing to run code before writing files to
disk.
Contributed by Patrick Arminio via PR #1760
v0.103.8
Compare Source
This release adds a
python_type
to the codegenGraphQLEnum
classto allow access to the original python enum when generating code
Contributed by Patrick Arminio via [PR #1752](https://togithub.com/strawberry
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.