LucianViana / graphql-java-course

curso de graphq-java
0 stars 0 forks source link

HttpInput issue #1

Open bhabegger opened 3 months ago

bhabegger commented 3 months ago

I checked your code and here in fact it should simply be Content.Sink.write, not HttpInput.Content.Sink.write. Then it compiles.

https://github.com/LucianViana/graphql-java-course/blob/782f8f976a1ca151b16a3a0945c8907c9bd9d749/src/main/java/tech/habegger/graphql/course/http/GraphiQLHandler.java#L37

LucianViana commented 2 months ago

I went back to using the hack with "jetty-servlet" with version "9.3.9.M1" in pom.xml and jar "jetty-server" "12.0.8" and not "jetty-server" "12.0.0" because I couldn't use graphiql on port 8080 because that ...json EOF error occurred..... and it crashed here in the time to convert the response to the graphqlRequest class here GraphQLHandler.java `... return MAPPER.readValue(jsonContent, GraphQLRequest.class); .. Note: I wrote it here and not in the course because it could be a specific problem located here in my intellij but if you want, I can write it there too, ok.

LucianViana commented 2 months ago

The problem was that my intellij didn't work with "jetty" version "12.0 8", it still displays an error in the "HttpHeader" of the "org...jetty.http" package, but the project works perfectly. Thanks

bhabegger commented 2 months ago

I think you may have a configuration issue in IntelliJ. You might want to unlink the project as a never project and then re-link it. This way it will get the dependencies from maven. Also remove any jars you manually addedto your IntelliJ project. When using maven there is no need to change dependencies directly in the IntelliJ project config.