graphql-java-spring | GraphQL Java Spring and Spring Boot integration | GraphQL library
kandi X-RAY | graphql-java-spring Summary
kandi X-RAY | graphql-java-spring Summary
This project integrates GraphQL Java into Spring/Spring Boot, by enabling query execution via HTTP. While the GraphQL Specification itself doesn't specify any transport protocol there is a quasi standard how to do it described here and this project follows this quasi standard.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Perform a POST request
- Set the value of the query
- Converts a JSON string to a Map
- Executes a query
- Customize graphql
- Returns the query string
- Gets the name of the operation
- Returns a map of all variables in the context
- Makes a GraphQL POST request
- Set the value of the query
- Converts a JSON string to a Map
- Executes a query
- Executes the graphql invocation
- Returns the query string
- Gets the name of the operation
- Returns a map of all variables in the context
- Customize the given ExecutionInput
- Customize the ExecutionInput
- Handles a single execution result
- This is a convenience method to handle the execution result
- Deserialize an object from a JSON string
- Serializes the given object to a JSON string
- Convert execution result to specification object
- Handles GET request
graphql-java-spring Key Features
graphql-java-spring Examples and Code Snippets
Community Discussions
Trending Discussions on graphql-java-spring
QUESTION
my target is to build a GraphQL server on Spring with (1) GraphiQL IDE (2) dynamic GraphQL schema at run-time. My GraphQL engine is GraphQL-Java.
In my first try, I use graphql-java-spring-boot-starter-webmvc and graphiql-spring-boot-starter. Both the GraphQL server and the GraphiQL work well. However, under the graphql-java-spring-boot-starter-webmvc framework, a @Bean of GraphQL class is needed. In this bean, the schema is loaded when the server starts so it could not been updated.
In my second try, I don't use graphql-java-spring-boot-starter-webmvc. Instead, I choose spring-boot-starter-web to start the web server and define my own RestController. This is easy to update the GraphQL instance. But I don't find a way to integrate with GraphiQL. I googled GraphiQL+Spring but all solutions are with graphql-java-spring-boot-starter.
Appreciate if anyone could provide me an idea on either approach.
...ANSWER
Answered 2019-Sep-20 at 20:17Do you have a sample of your setup in git?
- It sounds like some configuration problem. But naturally using graphql-java-spring-boot-starter-webmvc all your
*.graphql
schemas should be picked up in the configured schema resource path. check if you have the path set in yourapplication.yml
or if your schema is in the configured path if its already set or by default.
On your second point: "I googled GraphiQL+Spring but all solutions are with graphql-java-spring-boot-starter."
- This makes sense for quick guides and demos as using Springboot the plumbing is somehow hidden away from you so that you can focus on the technology at hand being demo'd in this case GraphQl.
On GraphiQL:
- Sounds like you are intending to have this embedded with your application, you may not want to do so in production. Depending on your use case there are many other alternatives that are standalone and gives you all the functionality of GraphiQL plus more e.g Altair Graphql Client and Insomnia to name a few.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install graphql-java-spring
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page