graphql-laravel icon indicating copy to clipboard operation
graphql-laravel copied to clipboard

Custom Query Fails to Load in Laravel 11 with graphql-laravel

Open ricardosierra opened this issue 7 months ago • 0 comments

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:

  1. Create a Query Class: Define a new query class with a query() method. Example: image

  2. Define a GraphQL Type:

    Create a type that utilizes the custom query. Example: image

  3. Observe the Result:

    The custom query remains unpopulated, showing no data or structure. Screenshot: image

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.

ricardosierra avatar Jul 16 '24 00:07 ricardosierra