Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requesting undefined subfield results in a fatal error #10

Closed
Zombaya opened this issue Jul 11, 2016 · 2 comments
Closed

Requesting undefined subfield results in a fatal error #10

Zombaya opened this issue Jul 11, 2016 · 2 comments

Comments

@Zombaya
Copy link
Contributor

Zombaya commented Jul 11, 2016

If you request a subfield which is not defined, you get a fatal error.

Example-query

{Test{
  name,
  bla {
  }
}}

The test-type only has the field name defined. The subfield bla is never defined which causes the fatal error.

Testfiles

testfiles.zip

Stacktrace

( ! ) Fatal error: Uncaught TypeError: Argument 2 passed to Youshido\GraphQL\Execution\Processor::processQueryAST() must be an instance of Youshido\GraphQL\Field\AbstractField, null given, called in /home/pieter/workfiles/sigura-industries/vendor/youshido/graphql/src/Execution/Processor.php on line 332 and defined in /home/pieter/workfiles/sigura-industries/vendor/youshido/graphql/src/Execution/Processor.php on line 127
( ! ) TypeError: Argument 2 passed to Youshido\GraphQL\Execution\Processor::processQueryAST() must be an instance of Youshido\GraphQL\Field\AbstractField, null given, called in /home/pieter/workfiles/sigura-industries/vendor/youshido/graphql/src/Execution/Processor.php on line 332 in /home/pieter/workfiles/sigura-industries/vendor/youshido/graphql/src/Execution/Processor.php on line 127
Call Stack
#TimeMemoryFunctionLocation
10.0002384928{main}( ).../graphql.php:0
20.0089706880Sigura\Mods\Industries\Graphql->__construct( ).../graphql.php:8
30.12322184024Youshido\GraphQL\Execution\Processor->processPayload( ).../Graphql.class.php:122
40.12482253088Youshido\GraphQL\Execution\Processor->executeOperation( ).../Processor.php:76
50.12492270560Youshido\GraphQL\Execution\Processor->processQueryAST( ).../Processor.php:118
60.12512395400Youshido\GraphQL\Execution\Processor->collectValueForQueryWithType( ).../Processor.php:135
70.12522398864Youshido\GraphQL\Execution\Processor->processQueryFields( ).../Processor.php:171
80.12542424840Youshido\GraphQL\Execution\Processor->processQueryAST( ).../Processor.php:332
@viniychuk
Copy link
Member

@Zombaya thanks for reporting the problem, we'll get it fixed asap.

viniychuk added a commit that referenced this issue Jul 13, 2016
@viniychuk
Copy link
Member

this got fixed in the latest release - v1.1.4

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

No branches or pull requests

2 participants