Skip to content

Conversation

@justin-longbottom
Copy link
Contributor

@justin-longbottom justin-longbottom commented Aug 7, 2019

After a fresh install of the module, the create server form has a few errors and warnings.

Notice: Undefined index: schema in Drupal\graphql\Form\ServerForm->form() (line 92 of modules/contrib/graphql/src/Form/ServerForm.php).
Drupal\graphql\Form\ServerForm->form(Array, Object) (Line: 117)
Notice: Only variables should be passed by reference in Drupal\graphql\Form\ServerForm->form() (line 92 of modules/contrib/graphql/src/Form/ServerForm.php).
Drupal\graphql\Form\ServerForm->form(Array, Object) (Line: 117)
Notice: Undefined index: #options in Drupal\Core\Render\Element\Checkboxes::processCheckboxes() (line 58 of core/lib/Drupal/Core/Render/Element/Checkboxes.php).
Warning: count(): Parameter must be an array or an object that implements Countable in Drupal\Core\Render\Element\Checkboxes::processCheckboxes() (line 58 of core/lib/Drupal/Core/Render/Element/Checkboxes.php).

@codecov
Copy link

codecov bot commented Aug 7, 2019

Codecov Report

Merging #878 into 8.x-4.x will decrease coverage by 0.05%.
The diff coverage is 0%.

Impacted file tree graph

@@              Coverage Diff              @@
##             8.x-4.x     #878      +/-   ##
=============================================
- Coverage      66.43%   66.38%   -0.06%     
  Complexity       587      587              
=============================================
  Files             92       92              
  Lines           1299     1300       +1     
=============================================
  Hits             863      863              
- Misses           436      437       +1
Impacted Files Coverage Δ Complexity Δ
src/Plugin/GraphQL/Schema/ComposableSchema.php 0% <0%> (ø) 11 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 526eeea...d754460. Read the comment docs.

@mkochendorfer
Copy link

The PR fixed the errors for me as well.

@sebas5384
Copy link
Contributor

Thanks! this PR worked 👍

@fubhy fubhy merged commit 0c42886 into drupal-graphql:8.x-4.x Oct 15, 2019
@fubhy
Copy link
Contributor

fubhy commented Oct 15, 2019

Thanks. I adjusted the fix according to klausi's suggestion.

@vouza
Copy link

vouza commented Jun 22, 2020

I still receive the error Notice: Undefined index: schema in Drupal\graphql\Form\ServerForm->form()
$arr = array_keys($schemas); $schema = ($inputSchema ?? $server->get('schema')) ?: reset($arr);
should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants