graphql-laravel
graphql-laravel copied to clipboard
Custom Query Fails to Load in Laravel 11 with graphql-laravel
Versions:
- graphql-laravel Version: 9.5.0
- Laravel Version: 11.15.0
- PHP Version: 8.3
Description:
In Laravel 11, custom queries are not being loaded when defined in a graphql-laravel setup. This issue prevents the application from utilizing custom query functionalities, affecting data retrieval processes. Steps to Reproduce:
Steps To Reproduce:
-
Create a Query Class: Define a new query class with a query() method. Example:
-
Define a GraphQL Type:
Create a type that utilizes the custom query. Example:
-
Observe the Result:
The custom query remains unpopulated, showing no data or structure. Screenshot:
Expected Behavior:
The custom query should be correctly loaded and executed, fetching and displaying data as specified in the GraphQL type definition. Actual Behavior:
The custom query does not load any data and appears empty, indicating a potential issue with how the query is registered or executed in the graphql-laravel integration.
Additional Information:
No modifications were made to the base graphql-laravel configuration other than the introduction of the custom query.
This issue is reproducible in a clean Laravel 11 environment with the same PHP and graphql-laravel versions.