Closed MilesWuCode closed 4 years ago
Can you provide a PR with a failing test case in https://github.com/nuwave/lighthouse/blob/master/tests/Integration/Schema/Directives/HasManyDirectiveTest.php ?
Can you provide a PR with a failing test case in https://github.com/nuwave/lighthouse/blob/master/tests/Integration/Schema/Directives/HasManyDirectiveTest.php ?
i try to Tests, @hasMany and @paginate is Ok!
this error when "schema.graphql" use #import , will appear
#import user.graphql
#import todo.graphql
#import
does nothing but concatinate the schema strings. I don't see how that could be the cause of the bug.
It may however be related to the merging of fields through extend type
, can you try adding an example like this to the test file?
#import
does nothing but concatinate the schema strings. I don't see how that could be the cause of the bug.It may however be related to the merging of fields through
extend type
, can you try adding an example like this to the test file?
Sorry my test skill only sample php i don't know graphql file how to change #import for test.... so.....this is video url is my process https://drive.google.com/file/d/1FKDkPriDN3F3G3nAPNTBx2QNyQnpQoAN/view?usp=sharing
Check out our contribution guide for information on how you can run our testsuite: https://github.com/nuwave/lighthouse/blob/master/CONTRIBUTING.md#testing
Add a representative example that matches your test case to https://github.com/nuwave/lighthouse/blob/master/tests/Integration/Schema/Directives/HasManyDirectiveTest.php and try to reproduce the error. You don't have to use #import
, just modify the schema in the test class so it matches what you have in your app.
#import
does nothing but concatinate the schema strings. I don't see how that could be the cause of the bug.You don't have to use #import, just modify the schema in the test class ....
Every code is working NO '#import' is working $this->schema = '.....' can write '#import' ? i don't think so...
The mechanism behing #import
is really simple and well tested. It is really just string concatenation. You can just copy-and-paste the contents of your extracted files directly into schema.graphql
, i expect the error to persist.
That is why i think the error might originate from something else, maybe the usage of extend
. Just put the whole schema that triggers it in $this->schema
.
I have the same problem with that guy
https://stackoverflow.com/questions/59726381/laravel-lighthouse-using-paginate-on-related-models-breaks-ability-to-query-mo