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

Docs not being loaded #36

Closed
cwray-tech opened this issue Feb 11, 2024 · 5 comments
Closed

Docs not being loaded #36

cwray-tech opened this issue Feb 11, 2024 · 5 comments

Comments

@cwray-tech
Copy link

I am using Laravel Lighthouse. I just installed it today, and this package. Ever since installing I'm getting the error below:

{
  "errors": [
    {
      "message": "Failed to fetch",
      "stack": "TypeError: Failed to fetch\n    at http://unpkg.com/graphiql/graphiql.min.js:65084:22\n    at Generator.next (<anonymous>)\n    at http://unpkg.com/graphiql/graphiql.min.js:65003:67\n    at new Promise (<anonymous>)\n    at __webpack_modules__.../../graphiql-toolkit/esm/create-fetcher/lib.js.__awaiter (http://unpkg.com/graphiql/graphiql.min.js:64985:10)\n    at http://unpkg.com/graphiql/graphiql.min.js:65083:85\n    at http://unpkg.com/graphiql/graphiql.min.js:64912:54\n    at fetchIntrospectionData (http://unpkg.com/graphiql/graphiql.min.js:58264:40)\n    at http://unpkg.com/graphiql/graphiql.min.js:58286:39\n    at http://unpkg.com/graphiql/graphiql.min.js:58298:5"
    }
  ]
}

Is this an issue or have I set something up improperly? I'm using Laravel 9 with PHP 8.

@spawnia
Copy link
Member

spawnia commented Feb 12, 2024

I am very curious how you are getting this error, as it appears to be a JavaScript error that is formatted as JSON. How can this be reproduced?

@cwray-tech
Copy link
Author

@spawnia this is what is produced when clicking docs. it is displayed in the query results area. This is what was shown after I installed the package and visited the gui.

@spawnia
Copy link
Member

spawnia commented Feb 13, 2024

I can not reproduce the issue in my installation. Have you tried https://github.com/mll-lab/laravel-graphiql#local-assets?

@cwray-tech
Copy link
Author

I did try that. It is not related to the JavaScript/CSS I don't think. It is having an issue fetching the schema for the docs.

@spawnia
Copy link
Member

spawnia commented Feb 15, 2024

Yeah, Failed to fetch probably indicates on issue with your GraphQL server. Anyways, this package is only a slim wrapper around GraphiQL, and the issue does not seem to be related to how GraphiQL is served or how its assets are delivered to the browser. Thus, I believe there is nothing we can change in this package and am closing the issue.

@spawnia spawnia closed this as not planned Won't fix, can't repro, duplicate, stale Feb 15, 2024
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