Category: graphql

How to set cookies for response in GraphQL mutation in Symfony 5?

How to set cookies for response in GraphQL resolver in Symfony 5? I am generating JWT token in mutation resolver and I want to set this token to Http cookie. // LoginMutator.php namespace AppGraphQLMutatorsSecurity; … class LoginMutator implements MutationInterface {…

Cannot return null for non-nullable field on API platform and graphql

I have an “user” entity with an unmapped property like this : namespace AppEntityUser; // … /** * @var string * @Groups({“readAnnounce”, “readUser”}) */ private $lastUrlImageProfilValid; /** * @return string */ public function getLastUrlImageProfilValid() { foreach ($this->imageProfil as $image){ if…