pageballoon / headstart

Decoupled GraphQL-driven content management using OctoberCMS
https://octobercms.com/plugin/nocio-headstart
MIT License
7 stars 2 forks source link

I have other problem: Lighthouse and query #4

Closed cfuhr closed 4 years ago

cfuhr commented 4 years ago

Hello, when I want to make a query using Lighthouse I always receive an error. If you can help me with this I would appreciate it. I enclose screenshots. HeadStart_error HeadStart_Lighthouse_error

frthjf commented 4 years ago

Hi Claudio,

For the first screenshot, from the error message it appears you are encountering this issue: https://github.com/nuwave/lighthouse/issues/730. The problem is that you just open the endpoint without sending a GraphQL query.

Now, I'm not sure what the second error message is because it's scrolled out of the view, but my suspicion is that there is a problem with the schema. If you've installed the blog.htm template, the problem might be that the Type BackendUser in the line user: BackendUser @belongsTo is undefined. If so, just remove that line or add the type by installing the user template, but in general the error message in the HTML output will tell you what's wrong.

Since it's a bit hard to workout the HTML error message from the HTML source, I recommend using https://insomnia.rest/ or some other client that renders it directly.

Hope that helps.

cfuhr commented 4 years ago

Hello,

For the first screenshot it contains the browser view of the html code of the problem of the second screenshot.

frthjf commented 4 years ago

Hi,

I'm sorry you are still encountering this issue. From the linked issue, the cause is most likely that the query is not being sent correctly. This could be a bug or something to do with the setup of the endpoint. Does the query also fail if you use a different query client like insomnia?

Also, can you try and run the following query:

{
 headstart
}

Many thanks!

cfuhr commented 4 years ago

Hi, I asked the question you asked for. I used another graphql client, a firefox add-on.

headstart_graphql

I attach the result in json format.

headstart_graphql_json.txt

Regards

-- Claudio

frthjf commented 4 years ago

Thanks, that seems to work correctly. What's the response for the blogPost query?

cfuhr commented 4 years ago

headstart_graphql_2

headstart_graphql_blogPosts_error.txt

frthjf commented 4 years ago

Thanks, this is the problem that I've mentioned above.

In the schema, can you comment out line 18 like here with a #.

Or you can install the user template.

frthjf commented 4 years ago

Hi @cfuhr, I'm closing this assuming it's not an issue any longer. Let me know if the issue still persists.

frthjf commented 4 years ago

Hi @cfuhr, I believe the error might have been caused by #9.