1000 search results

Great lessons, thanks! Is there a video on how to use GraphQl based on Api-Platform?
Hey @Sebastian-K! Hmm, interesting! Subresources are cool - and are MUCH nicer than in API Platform 2 (they were kind of a hacked addon the, but they're a first-class citizen now). And so, we can definitely use them. But we also may not…
weaverryan
weaverryan
Read Full Comment
i think you put the coding-challenge before this chapter by mistake. btw. Ryan ... my cats missing the cat-lang of the courses. they still stuck on Api-Platform 2.6.
Hey @Oleh-K! Sorry for the slow reply! Hmm. I wonder: did you add the `access_token` config to `api_platform.yaml`? I actually think your solution is superior. My guess (I could be wrong) is that you don't have this config. And so…
weaverryan
weaverryan
Read Full Comment
…as `api_platform` config loaded during a compile time. So it is has not picked up ENV variables, and next configuration does not work: ``` api_platform: enable_swagger: '%env(bool:ENABLE_API_DOCS)%' # .... and other disablings ``` My current sollution, is: ``` when@prod: api_platform: enable…
Hey |mention:37028| I believe you're decorating the wrong service, this is the service you should decorate `api_platform.jsonld.normalizer.item` Cheers!
MolloKhan
MolloKhan
Read Full Comment
Hello! Thanks, but It does not solve the problem. However I've set a solution, for anybody who need it https://github.com/api-platform/core/issues/4672#issuecomment-1557480806.
…all of us struggling with an empty spec "No operations defined in spec!" using php 8 attributes, there's a compatibility layer that needs to be disabled: ``` api_platform: metadata_backward_compatibility_layer: false ``` Source: https://github.com/api-platform/core/issues/4485#issuecomment-933448396
amcastror
amcastror
Read Full Comment
…was maybe the ONE thing I didn't include in the API Platform 3 tutorial and at least 2 people have asked about it :P. Here is the other conversation - https://symfonycasts.com/screencast/api-platform/install#comment-29468 - it looks like the feature should…
weaverryan
weaverryan
Read Full Comment
… Sounds promising. And your use-case makes a lot of sense. This is one of those features where it feels like they probably shouldn't add something so automatic to the core of API Platform... but for certain projects, users can really leverage it. Good…
weaverryan
weaverryan
Read Full Comment
…I decided not to cover this for the API Platform 3 tutorial. I just wasn't sure how many people were actually using it. But I can also say that, afaik, there is nothing that makes this now a "bad idea" in API Platform 3…
weaverryan
weaverryan
Read Full Comment
API Platform 2, the creation of a Resource Metadata Factory was discussed. Since it is a very convenient way to create Metadata for inheritance structures (Bleu de Gex *extends* Blue Cheese *extends* Cheese) i would like to keep it after my migration to API Platform
…that feature. You'll have to **decorate** the `PaginationExtension` class then, or create a custom paginator. Here's an example about how to decorate an ApiPlatform service https://api-platform.com/docs/core/state-processors/#creating-a-custom-state-processor I hope it helps. Cheers!
MolloKhan
MolloKhan
Read Full Comment
Hey @Tobias-B! Your thinking on this is absolutely correct. For me, it was a trade-off between complexity (the API Platform official way is more complex) vs potential performance problems. So, the final decision is subjective, but since `PersistProcessor` is only called during POST…
weaverryan
weaverryan
Read Full Comment
… Hmm. Did you create an access token authenticator like we did? https://symfonycasts.com/screencast/api-platform-security/access-token-authenticator If so, here is what I would do to debug: A) After making the AJAX request to "log in", find the Symfony profiler for…
weaverryan
weaverryan
Read Full Comment
…call of the PersistProcessor? In the API Platform docs they use a "bind" in the services to bind the $persistProcessor as an argument to the "UserPasswordHasher". This way I guess it is only decorating the service when it is used (e.g. defining the "processor…
…way to go. https://github.com/api-platform/core/issues/5451 ``` api_platform: mapping: paths: ['%kernel.project_dir%/config/api_platform', '%kernel.project_dir%/src/Dto'] ``` ``` resources: App\DomainBundle\Entity\AdminUser: normalizationContext: groups: [ 'admin-user:read' ] denormalizationContext: groups: [ 'admin-user:write' ] operations: ApiPlatform\Metadata\GetCollection: …
Hey |mention:150| Perhaps you need a cursor or partial pagination, you can learn more about them in the docs https://api-platform.com/docs/core/pagination/#cursor-based-pagination Also, remember that you can "decorate" APIPlatform services to extend/modify their behavior Cheers!
MolloKhan
MolloKhan
Read Full Comment
…what you mean by "using an offset" but have you read the last topics of the documentation? https://api-platform.com/docs/core/pagination/#controlling-the-behavior-of-the-doctrine-orm-paginator I believe you'll need to extend or create a custom paginator Cheers!
MolloKhan
MolloKhan
Read Full Comment
…https://api-platform.com/docs/core/events/#the-event-system Doctrine Event system is not GraphQL friendly. So, instead of using Doctrine event system, API Platform advises what they call extension points, in order to stay compatible with both REST and GraphQL: https://api-platform