You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update graphql, events & extending docs for Laravel and v4 (#2026)
* Update event listener configuration for API Platform 4.0
Updated the documentation to reflect the requirement of `use_symfony_listeners: true` for activating event listeners in API Platform 4.0. Also reformatted existing notes for better clarity and added separation lines for improved readability.
* Add documentation on system providers and processors
This commit introduces detailed documentation on the workflow of state providers and processors in the system. It includes a schema, examples of decorating providers and processors, and specific implementations for both Symfony and Laravel frameworks.
* Update GraphQL docs to include Laravel-specific instructions
This update adds detailed instructions for enabling and configuring GraphQL in a Laravel environment, complementing the existing Symfony guidance. It covers installation, route configurations, disabling features, custom resolvers, and altering default settings specific to Laravel, ensuring comprehensive and platform-specific documentation.
* Remove specific framework & Docker for GraphQL installation commands
* Refactor GraphQL & extending documentations for clarity and accuracy
Updated terminology from "stages" to "providers and processors" for better clarity. Removed redundant sections to streamline information on custom mutations and configuration examples.
* Fix capitalize title
Co-authored-by: Kévin Dunglas <[email protected]>
* Fix capitalize title
Co-authored-by: Kévin Dunglas <[email protected]>
* Fix capitalize title
Co-authored-by: Kévin Dunglas <[email protected]>
* Fix capitalize title
Co-authored-by: Kévin Dunglas <[email protected]>
* Fix title
Co-authored-by: Kévin Dunglas <[email protected]>
* Fix title
Co-authored-by: Kévin Dunglas <[email protected]>
* Fix titles and coding style
* Fix wrong implementation & rm duplicate code
* Fix spelling and class rendering
Co-authored-by: Antoine Bluchet <[email protected]>
* Fix title with a better title name
Co-authored-by: Antoine Bluchet <[email protected]>
* Fix title with a better title name
Co-authored-by: Antoine Bluchet <[email protected]>
* Fix remove unused method
Co-authored-by: Antoine Bluchet <[email protected]>
* Fix remove unused method
Co-authored-by: Antoine Bluchet <[email protected]>
* Fix remove unused method
Co-authored-by: Antoine Bluchet <[email protected]>
* Fix by rephrasing not available commands message
Co-authored-by: Antoine Bluchet <[email protected]>
* Fix better explanations to enable GraphQL
Co-authored-by: Antoine Bluchet <[email protected]>
* Fix remove unused declaration in the Laravel container
Co-authored-by: Antoine Bluchet <[email protected]>
* Fix typo
Co-authored-by: Alan Poulain <[email protected]>
* Fix typo
Co-authored-by: Alan Poulain <[email protected]>
* Fix spelling
Co-authored-by: Alan Poulain <[email protected]>
* Fix typo
Co-authored-by: Alan Poulain <[email protected]>
* Fix typo
Co-authored-by: Alan Poulain <[email protected]>
* Fix missing var assignation
Co-authored-by: Alan Poulain <[email protected]>
* Add recommendation for using system providers and processors
* Add GraphQL state provider access checker notes & cleanup
* Completes GraphQL doc for Laravel support & clarified some points reviewed
* Fix string syntax error
Co-authored-by: Alan Poulain <[email protected]>
* Apply suggestions from code review
---------
Co-authored-by: Kévin Dunglas <[email protected]>
Co-authored-by: Antoine Bluchet <[email protected]>
Co-authored-by: Alan Poulain <[email protected]>
Copy file name to clipboardExpand all lines: core/extending.md
+112Lines changed: 112 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -36,3 +36,115 @@ For instance, if you want to send a mail after a resource has been persisted, bu
36
36
To replace existing API Platform services with your decorators, [check out how to decorate services](https://symfony.com/doc/current/service_container/service_decoration.html).
37
37
38
38
<palign="center"class="symfonycasts"><ahref="https://symfonycasts.com/screencast/api-platform-security/service-decoration?cid=apip"><imgsrc="../symfony/images/symfonycasts-player.png"alt="Service Decoration screencast"><br>Watch the Service Decoration screencast</a></p>
39
+
40
+
## System Providers and Processors
41
+
42
+
The system is based on a workflow composed of **state providers** and **state processors**.
43
+
44
+
The schema below describes them:
45
+
46
+
```mermaid
47
+
---
48
+
title: System providers and processors
49
+
---
50
+
flowchart TB
51
+
C1(ReadProvider) --> C2(AccessCheckerProvider)
52
+
C2 --> C3(DeserializeProvider)
53
+
C3 --> C4(ParameterProvider)
54
+
C4 --> C5(ValidateProcessor)
55
+
C5 --> C6(WriteProcessor)
56
+
C6 --> C7(SerializeProcessor)
57
+
```
58
+
59
+
### Symfony Access Checker Provider
60
+
61
+
When using Symfony, the access checker provider is used at three different stages:
62
+
-`api_platform.state_provider.access_checker.post_validate` decorates the `ValidateProvider`
63
+
-`api_platform.state_provider.access_checker.post_deserialize` decorates the `DeserializeProvider`
64
+
-`api_platform.state_provider.access_checker` decorates the `ReadProvider`
65
+
66
+
> [!NOTE]
67
+
> For graphql use: `api_platform.graphql.state_provider.access_checker.post_deserialize`,
68
+
> `api_platform.graphql.state_provider.access_checker.post_validate`, `api_platform.graphql.state_provider.validate` and
0 commit comments