Skip to content
Snippets Groups Projects
Commit 05e8fe5d authored by Klaus Purer's avatar Klaus Purer
Browse files

fix(uninstall): Fix language negotiation ID in uninstall function (#3476689)

parent a5628917
No related branches found
No related tags found
1 merge request!24fix(uninstall): Fix language negotiation ID in uninstall function (#3476689)
Pipeline #446613 passed
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
*/ */
use Drupal\graphql\Entity\Server; use Drupal\graphql\Entity\Server;
use Drupal\graphql\Plugin\LanguageNegotiation\OperationLanguageNegotiation;
use GraphQL\Error\DebugFlag; use GraphQL\Error\DebugFlag;
/** /**
...@@ -38,7 +39,7 @@ function graphql_uninstall(): void { ...@@ -38,7 +39,7 @@ function graphql_uninstall(): void {
$languageTypes = $configFactory->getEditable('language.types'); $languageTypes = $configFactory->getEditable('language.types');
if ($negotiation = $languageTypes->get('negotiation')) { if ($negotiation = $languageTypes->get('negotiation')) {
foreach (array_keys($negotiation) as $type) { foreach (array_keys($negotiation) as $type) {
unset($negotiation[$type]['enabled']['language-graphql']); unset($negotiation[$type]['enabled'][OperationLanguageNegotiation::METHOD_ID]);
} }
$languageTypes->set('negotiation', $negotiation)->save(); $languageTypes->set('negotiation', $negotiation)->save();
} }
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment