@@ -218,8 +218,8 @@ public function validateForm(array &$form, FormStateInterface $formState) {
218218 $ formState ->setErrorByName ('endpoint ' , 'The endpoint path contains invalid characters. ' );
219219 }
220220
221- /** @var \Drupal\graphql\Plugin\SchemaPluginInterface $instance */
222221 $ schema = $ formState ->getValue ('schema ' );
222+ /** @var \Drupal\graphql\Plugin\SchemaPluginInterface $instance */
223223 $ instance = $ this ->schemaManager ->createInstance ($ schema );
224224 if (!empty ($ form ['schema_configuration ' ][$ schema ]) && $ instance instanceof PluginFormInterface && $ instance instanceof ConfigurableInterface) {
225225 $ state = SubformState::createForSubform ($ form ['schema_configuration ' ][$ schema ], $ form , $ formState );
@@ -233,8 +233,8 @@ public function validateForm(array &$form, FormStateInterface $formState) {
233233 public function submitForm (array &$ form , FormStateInterface $ formState ) {
234234 parent ::submitForm ($ form , $ formState );
235235
236- /** @var \Drupal\graphql\Plugin\SchemaPluginInterface $instance */
237236 $ schema = $ formState ->getValue ('schema ' );
237+ /** @var \Drupal\graphql\Plugin\SchemaPluginInterface $instance */
238238 $ instance = $ this ->schemaManager ->createInstance ($ schema );
239239 if ($ instance instanceof PluginFormInterface && $ instance instanceof ConfigurableInterface) {
240240 $ state = SubformState::createForSubform ($ form ['schema_configuration ' ][$ schema ], $ form , $ formState );
@@ -248,13 +248,14 @@ public function submitForm(array &$form, FormStateInterface $formState) {
248248 * @throws \Drupal\Component\Plugin\Exception\PluginException
249249 */
250250 public function save (array $ form , FormStateInterface $ formState ) {
251- parent ::save ($ form , $ formState );
251+ $ save_result = parent ::save ($ form , $ formState );
252252
253253 $ this ->messenger ()->addMessage ($ this ->t ('Saved the %label server. ' , [
254254 '%label ' => $ this ->entity ->label (),
255255 ]));
256256
257257 $ formState ->setRedirect ('entity.graphql_server.collection ' );
258+ return $ save_result ;
258259 }
259260
260261}
0 commit comments