1027 search results for API Platform

I just noticed while debugging that at least in Api Platform 2.6, the `$this->pagination->getPagination()` call in `DailyStatsProvider` line 28 actually needs a third argument – `$context`. Without it, `$page` is always 1. ...
Hey there . What if I want to use a DTO input class for the owner entity also? I couldn't find any cast about embedded relations (like https://symfonycasts.com/screencast/api-platform/embedded) for DTO classes. ...
Christin G.
Christin G.
Read Full Comment
Hi, Tell me please, Are there many diference between 4.x 5.3 SF versions? Can I study authentication and authtorsation by this tutorial, or better to start from "API Platform Part 2: Security" ? Thank you. ...
I believe you checked the wrong file. I'm talking about the file inside `config/routes`. Its content should be like this one https://github.com/symfony/recipes/blob/master/api-platform/core/2.1/config/routes/api_platform.yaml Cheers! ...
MolloKhan
MolloKhan
Read Full Comment
Yo Alexandr K.! This is... unfortunately, not currently possible. But there is a good conversation about it and some ways to go about doing that here - https://github.com/api-platform/core/issues/2275 Cheers! ...
weaverryan
weaverryan
Read Full Comment
Hello. I have 2 groups to read: * @ApiResource( * normalizationContext={"groups"={"group:read","group_clear:read"}} * ) By default works "group:read" context. How can I make a request to the api platform to get data in context "group_clear:read"? ...
Hey Ryan, Oh yeah, now I see my mistake, I'm still using the `AutoGroupResourceMetadataFactory::getDefaultGroups` from https://symfonycasts.com/screencast/api-platform-security/resource-metadata-factory While it has been deleted for the 3rd tutorial :) Just disabled - everything works! ...
Sure I did it: https://github.com/api-platform/docs/pull/1234 About your suggestion, I am now trying to solve an issue with deserialization, and after I'll try it :) ...
Actually i already try based on this example. BTW the API Platform doc example is slightly different from the SFCast course. One is extending AbstractContextAwareFilter and the other one AbstractFilter, does it matter ? I forgot to mention i'm using GraphQL ...
Hey Victor, Great tutorial - BTW :) I'm using version 2.5.7. When you follow methods path you'll end up here: https://github.com/api-platform/core/blob/37b5edf50cc05299b12cb8982be3efa035d726ce/src/DataProvider/Pagination.php#L249 - so page number is actually taken from the context. ...
Rafał Greg
Rafał Greg
Read Full Comment
We also talk about a way to get the original data here - https://symfonycasts.com/screencast/api-platform-extending/publish-state-change#codeblock-b24168863c - sorry we didn't get back to you about that Twiscard! Thanks @Flavius for posting your solution :). Cheers! ...
weaverryan
weaverryan
Read Full Comment
I have completed this courese. Thnks there for your good company. Also plant to take other course in the series. I am looking for some open source projects using api platform. can anyone suggest ? ...
Nope =) The idea is not to hide the Uncaught exceptions messages, but to handle them. Maybe I should create an Exception Listener and then catch any Uncaught Exception here. Cause API platform does not catches an AccessDeniedException by default. Cheers! ...
Hey julien_bonnier We are sorry that you got this issue, Thanks for sharing you solution! BTW we updated base code of Api platform tutorial so it should be issue free now ) Cheers! ...
Hey Hannah R. I think you will need to create a custom Voter for implementing such logic. In this chapter you can watch (or read) how to do it https://symfonycasts.com/screencast/api-platform-security/access-control-voter Cheers! ...
MolloKhan
MolloKhan
Read Full Comment
Hey Yves I recommend you to read about Serialization groups or you want watch this chapter https://symfonycasts.com/screencast/api-platform/serialization-groups Basically, you define property by property if you want to make it readable and/or writeable Cheers! ...
MolloKhan
MolloKhan
Read Full Comment
Just FYI, we added a note about it a bit earlier when we're talking about "access_control" for the first time: https://symfonycasts.com/screencast/api-platform-security/access-control#codeblock-ca94f235ae Cheers! ...
Hi there How would you implement the reset password feature with API Platform? Would you create another action in the Security controller or a custom operation for the User resource? Thanks ...
If I get it right what you want is a custom field on your objects, if that's the case I recommend you to watch this chapter: https://symfonycasts.com/screencast/api-platform-security/custom-normalizer Cheers! ...
MolloKhan
MolloKhan
Read Full Comment
Crazy situation and few hours later all the time on this problem, now it works. Everything started to work when I switched other entities api-platform shortName definition by entityName to entityname (all lower case and without underscore) ...