Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/frontend/src/content/docs/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ title: Strawberry docs

- [Deployment](/docs/operations/deployment)
- [Testing](/docs/operations/testing)
- [Tracing](/docs/operations/tracing)
- [Tracing](/docs/operations/tracing)
4 changes: 2 additions & 2 deletions apps/frontend/src/content/docs/_test.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ This is a warning. Something that you should be careful about.
## Blockquote

> This is a quote
>
>


```mermaid
Expand All @@ -136,4 +136,4 @@ sequenceDiagram

Bob-->Alice: Checking with John...
Alice->John: Yes... John, how are you?
```
```
2 changes: 1 addition & 1 deletion apps/frontend/src/content/docs/breaking-changes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ title: List of breaking changes and deprecations
- [Version 0.180.0 - 31 May 2023](/docs/breaking-changes/0.180.0)
- [Version 0.169.0 - 5 April 2023](/docs/breaking-changes/0.169.0)
- [Version 0.159.0 - 22 February 2023](/docs/breaking-changes/0.159.0)
- [Version 0.146.0 - 5 December 2022](/docs/breaking-changes/0.146.0)
- [Version 0.146.0 - 5 December 2022](/docs/breaking-changes/0.146.0)
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ The context value is now a dictionary instead of a custom class. This means that
you should access the context value using the `["key"]` syntax instead of the
`.key` syntax.

The `.key` syntax is still supported but will be removed in future releases.
The `.key` syntax is still supported but will be removed in future releases.
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ See the following table for a mapping between the old and new hooks.
| on_parsing_start | on_parse |
| on_parsing_end | on_parse |
| on_executing_start | on_execute |
| on_executing_end | on_execute |
| on_executing_end | on_execute |
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ If you're customizing this method you can change the signature to:

```python
async def get_root_value(self, request: Request) -> Any: ...
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ for `info.context["ws"]`, `info.context["request"]` and

If you still want to use the `.key` syntax, you can override `get_context()` to
return a custom dataclass there. See the Channels integration documentation for
an example.
an example.
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Here's an example of the changes:

-graphql_app = GraphQLRouter(schema, graphiql=False)
+graphql_app = GraphQLRouter(schema, graphql_ide=None)
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ class Query:
@strawberry.field(permission_classes=[IsAuthorized])
def name(self, a_key: str) -> str: # pragma: no cover
return "Erik"
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ class Product:
original_info = info._raw_info

return Product(upc=upc)
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ we missed something.

```bash
strawberry upgrade update-imports
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ async def subscribe(
root_value: Optional[Any] = None,
operation_name: Optional[str] = None,
) -> Union[AsyncGenerator[ExecutionResult, None], PreExecutionError]:
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ from api.schema import schema
urlpatterns = [
path("graphql/", csrf_exempt(GraphQLView.as_view(schema=schema))),
]
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ removed in favor of the official Sentry SDK integration.

To migrate, remove the `SentryTracingExtension` from your Strawberry schema and
then follow the
[official Sentry SDK integration guide](https://docs.sentry.io/platforms/python/integrations/strawberry/).
[official Sentry SDK integration guide](https://docs.sentry.io/platforms/python/integrations/strawberry/).
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ your method can handle the same inputs as the built-in `json.dumps` method:

```python
def encode_json(self, data: object) -> str: ...
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ use the following configuration:
schema = strawberry.Schema(
query=Query, config=StrawberryConfig(relay_use_legacy_global_id=True)
)
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Now you need to do:

```python
from lia import HTTPException
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ complex scenarios where null handling is needed.
[migration guide](/docs/types/maybe#migration-from-previous-versions) for
detailed migration instructions
- If you encounter issues, please
[report them on GitHub](https://github.com/strawberry-graphql/strawberry/issues)
[report them on GitHub](https://github.com/strawberry-graphql/strawberry/issues)
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ Please update it to:

```bash
strawberry dev
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,4 @@ Federation v2.
- Review the
[Apollo Federation v2 documentation](https://www.apollographql.com/docs/federation/federation-2/new-in-federation-2/)
- If you encounter issues, please
[report them on GitHub](https://github.com/strawberry-graphql/strawberry/issues)
[report them on GitHub](https://github.com/strawberry-graphql/strawberry/issues)
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ The scalar wrapper exports (`Date`, `DateTime`, `Time`, `Decimal`, `UUID`,
standard Python types directly instead (`datetime.date`, `datetime.datetime`,
etc.).

A codemod is available: `strawberry upgrade replace-scalar-wrappers .`
A codemod is available: `strawberry upgrade replace-scalar-wrappers .`
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ app = GraphQL(
The same applies to SSE, which is enabled with `GRAPHQL_SSE_PROTOCOL`. Both
constants are importable from `strawberry.subscriptions`.

If you do not use multipart subscriptions, no changes are required.
If you do not use multipart subscriptions, no changes are required.
2 changes: 1 addition & 1 deletion apps/frontend/src/content/docs/cli/locate-definition.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ script, e.g.:
```

You can then use the go to definition feature to navigate to the definition of a
model or field.
model or field.
2 changes: 1 addition & 1 deletion apps/frontend/src/content/docs/codegen/query-codegen.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,4 @@ class ConsolePlugin:
def on_end(self, result: CodegenResult) -> None:
"""This method typically persists the results from a single query to the output directory."""
...
```
```
2 changes: 1 addition & 1 deletion apps/frontend/src/content/docs/codegen/schema-codegen.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ class User:


schema = strawberry.Schema(query=Query)
```
```
2 changes: 1 addition & 1 deletion apps/frontend/src/content/docs/concepts/async.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ class Query:


schema = strawberry.Schema(Query)
```
```
2 changes: 1 addition & 1 deletion apps/frontend/src/content/docs/concepts/typings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,4 @@ safety and consistency.
Strawberry takes inspiration from these languages by requiring that all of its
types, fields, resolvers, and mutations declare the types of their arguments and
returns. Through this, the schema is generated in a standard and efficient way
that aligns with the style-direction of Python and programming as a whole.
that aligns with the style-direction of Python and programming as a whole.
2 changes: 1 addition & 1 deletion apps/frontend/src/content/docs/django/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ title: Strawberry Django docs
## Resources

- [FAQ](/docs/django/faq)
- [Community Projects](/docs/django/community-projects)
- [Community Projects](/docs/django/community-projects)
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Those are some community maintained projects worth mentioning:
| [🐙 strawberry-django-extras](https://github.com/m4riok/strawberry-django-extras) | JWT Authentication, Input validation and permissions, mutation hooks and deeply nested CUD mutations |

If you want your integration to be listed here, send us a
[Pull Request](https://github.com/strawberry-graphql/strawberry-django/pulls)
[Pull Request](https://github.com/strawberry-graphql/strawberry-django/pulls)
2 changes: 1 addition & 1 deletion apps/frontend/src/content/docs/django/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -650,4 +650,4 @@ Use the Query Optimizer for sync contexts, or switch to ASGI.
- **Troubleshooting**: See [Troubleshooting guide](/docs/django/guide/troubleshooting)
- **GitHub Issues**: [Search existing issues](https://github.com/strawberry-graphql/strawberry-django/issues)
- **Discussions**: [GitHub Discussions](https://github.com/strawberry-graphql/strawberry-django/discussions)
- **Discord**: [Join the Strawberry Discord](https://strawberry.rocks/discord)
- **Discord**: [Join the Strawberry Discord](https://strawberry.rocks/discord)
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title: Authentication

> [!WARNING]
> This solution is designed for web browsers that support cookies. It will not work for clients that can't store cookies (e.g., mobile apps). For those scenarios, use token-based authentication methods like JWT with [strawberry-django-auth](https://github.com/nrbnlulu/strawberry-django-auth).
>
>


## Quick Start
Expand Down Expand Up @@ -304,4 +304,4 @@ You can catch these in your frontend or use [error handling extensions](/docs/dj

- [Permissions](/docs/django/guide/permissions) - Protecting fields and operations
- [Django Channels](/docs/django/integrations/channels) - WebSocket authentication setup
- [strawberry-django-auth](https://github.com/nrbnlulu/strawberry-django-auth) - JWT authentication
- [strawberry-django-auth](https://github.com/nrbnlulu/strawberry-django-auth) - JWT authentication
4 changes: 2 additions & 2 deletions apps/frontend/src/content/docs/django/guide/dataloaders.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DataLoaders help solve the N+1 query problem by batching and caching database qu

> [!TIP]
> Strawberry Django's [Query Optimizer](/docs/django/guide/optimizer) handles most optimization scenarios automatically. Use DataLoaders when you need custom batching logic or are working with external data sources.
>
>


## Using DataLoaders with Django
Expand Down Expand Up @@ -126,4 +126,4 @@ async def load_tags(article_ids: list[int]) -> list[list[models.Tag]]:
## See Also

- [Strawberry DataLoaders Docs](https://strawberry.rocks/docs/guides/dataloaders) - Official Strawberry documentation
- [Query Optimizer](/docs/django/guide/optimizer) - Automatic query optimization
- [Query Optimizer](/docs/django/guide/optimizer) - Automatic query optimization
Original file line number Diff line number Diff line change
Expand Up @@ -481,4 +481,4 @@ Only Django's built-in exceptions are automatically handled. For custom exceptio

- [Mutations](/docs/django/guide/mutations) - Creating and updating data
- [Permissions](/docs/django/guide/permissions) - Authorization and access control
- [Validation](/docs/django/guide/validation) - Input validation patterns
- [Validation](/docs/django/guide/validation) - Input validation patterns
4 changes: 2 additions & 2 deletions apps/frontend/src/content/docs/django/guide/export-schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Export Schema

> [!INFO]
> The `export_schema` management command provided here is specifically designed for use with `strawberry_django`. The [default Strawberry export command](https://strawberry.rocks/docs/guides/schema-export) won't work with `strawberry_django` schemas because `strawberry_django` extends the base functionality of Strawberry to integrate with Django models and queries. This command ensures proper schema export functionality.
>
>


The `export_schema` management command allows you to export a GraphQL schema defined using the `strawberry_django` library. This command converts the schema definition to GraphQL schema definition language (SDL), which can then be saved to a file or printed to the console.
Expand Down Expand Up @@ -35,4 +35,4 @@ Here's an example of how to use the export_schema command:
python manage.py export_schema myapp.schema --path=output/schema.graphql
```

In this example, the schema located at `myapp.schema` will be exported to the file `output/schema.graphql`.
In this example, the schema located at `myapp.schema` will be exported to the file `output/schema.graphql`.
8 changes: 4 additions & 4 deletions apps/frontend/src/content/docs/django/guide/fields.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: Defining Fields
> [!TIP]
> It is highly recommended to enable the [Query Optimizer Extension](/docs/django/guide/optimizer)
> for improved performance and avoid some common pitfalls (e.g. the `n+1` issue)
>
>


Fields can be defined manually or `auto` type can be used for automatic type resolution. All basic field types and relation fields are supported out of the box. If you use a library that defines a custom field you will need to define an equivalent type such as `str`, `float`, `bool`, `int` or `id`.
Expand Down Expand Up @@ -37,7 +37,7 @@ class Fruit2:
> [Django's TextChoices/IntegerChoices](https://docs.djangoproject.com/en/4.2/ref/models/fields/#enumeration-types)
> it is recommended using the [django-choices-field](/docs/django/integrations/choices-field) integration
> enum handling.
>
>


## Relationships
Expand Down Expand Up @@ -194,7 +194,7 @@ field_type_map.update({

> [!WARNING]
> These new keywords should be used with caution, as they may inadvertently lead to exposure of unwanted data. Especially with `fields="__all__"` or `exclude`, sensitive model attributes may be included and made available in the schema without your awareness.
>
>


`strawberry_django.type` includes two optional keyword fields to help you populate fields from the Django model, `fields` and `exclude`.
Expand Down Expand Up @@ -264,4 +264,4 @@ class UserQuery:
```

In this example, each of the fields of the `UserType` will be automatically created by `CustomStrawberryDjangoField`,
which may implement anything from custom pagination of relationships to altering the field permissions.
which may implement anything from custom pagination of relationships to altering the field permissions.
Loading