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

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

Open
ricardosierra opened this issue Jul 16, 2024 · 1 comment
Open

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

ricardosierra opened this issue Jul 16, 2024 · 1 comment
Labels

Comments

@ricardosierra
Copy link

ricardosierra commented Jul 16, 2024

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.

@mfn
Copy link
Collaborator

mfn commented Nov 17, 2024

I don't understand what you're trying to achieve.

You are trying to put a query as a field onto a type? I can't follow.

Also please don't paste code as image, this is incredible hard to read/understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants