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
Now that the "@type" annotation is supported in the interfaces, we can create a "me" query and modify the return type of the "login" query to return a `UserInterface`!
Copy file name to clipboardExpand all lines: DependencyInjection/Configuration.php
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,7 @@ public function getConfigTreeBuilder()
40
40
->arrayNode('security')
41
41
->children()
42
42
->enumNode('enable_login')->values(['on', 'off', 'auto'])->defaultValue('auto')->info('Enable to automatically create a login/logout mutation. "on": enable, "auto": enable if security bundle is available.')->end()
43
+
->enumNode('enable_me')->values(['on', 'off', 'auto'])->defaultValue('auto')->info('Enable to automatically create a "me" query to fetch the current user. "on": enable, "auto": enable if security bundle is available.')->end()
43
44
->scalarNode('firewall_name')->defaultValue('main')->info('The name of the firewall to use for login')->end()
if ($container->getParameter('graphqlite.security.enable_me') === 'on') {
153
+
if (!$container->has(TokenStorageInterface::class)) {
154
+
thrownewGraphQLException('In order to enable the "me" query (via the graphqlite.security.enable_me parameter), you need to install the security bundle.');
0 commit comments