eh3rrera / graphql-java-spring-boot-example

Sample GraphQL server implemented with graphql-java and Spring Boot
MIT License
211 stars 151 forks source link

Unable to access graphql urls #8

Closed Kunal1985 closed 6 years ago

Kunal1985 commented 6 years ago

I am able to access http://localhost:8080/graphiql and execute graphql queries in the GraphiQL interface

I am not able to access http://localhost:8080/graphql/schema.json, below the error page I see. image

Also cannot use it via ARC, below the screenshot image

Kindly suggest.

Kunal1985 commented 6 years ago

Ignore, i got it resolved. Nice starter kit though :)

eh3rrera commented 6 years ago

Great, thanks!

PatriciaSauer commented 5 years ago

@Kunal1985 What did you do to fix it? I am neither able to access http://localhost:8080/graphiql nor able to access http://localhost:8080/graphql/schema.json . I even cannot post something using Postman, I always get 405 when trying to post against http://localhost:8080/graphql.

@eh3rrera I implemented my solution by following your great tutorial. After this did not work, I cloned your repo but it did not work, too. Any ideas why the cloned repo might not be working?

Thanks in advance!

eh3rrera commented 5 years ago

Hi @PatriciaSauer. I cloned the repo and ran the application without problems in IntelliJ and Java 9.

However, when I run the application with Java 10, it fails with a NullPointerException. Maybe this could be the issue? It's been almost a year since I created this application and I haven't updated it due to lack of time.

Can you share more information about your environment or if it throws an error in the console?

PatriciaSauer commented 5 years ago

I did not modify the cloned repo. I cloned it and then started it. I wanted to see whether it works because my implementation by following your tutorial did not work. The cloned applications starts up fine. No error. But when I send a post request, I get a 405: { "timestamp": 1542268461797, "status": 405, "error": "Method Not Allowed", "exception": "org.springframework.web.HttpRequestMethodNotSupportedException", "message": "Request method 'POST' not supported", "path": "/graphql" }

When I try to access localhost:8080/graphiql , I get 404. The same with accessing http://localhost:8080/graphql/schema.json

I am working on a MacBook and tried with Java 9 and Java 10 globally set.

eh3rrera commented 5 years ago

I'm sorry @PatriciaSauer, I cannot reproduce the error. I don't know what might be the problem.

Since this issue is closed, I have created a new issue to continue the discussion and in case somebody else can help us.

themanojshukla commented 5 years ago

Long ago I got similar error, I don't remember what exactly was problem and solution.. but I'm pretty sure that I faced this before. If possible can you share your complete code on github so that I can try to reproduce and resolve it?

ABHIJEET-MUNESHWAR commented 5 years ago

Ignore, i got it resolved. Nice starter kit though :)

@Kunal1985 How did you resolve the issue?