This repository contains a basic example of implementing a GraphQL server using Java and Spring Boot. The content was created using ChatGPT-4.
- src/main/java: Contains the Java source files.
- controller: GraphQL controller.
- model: Data models.
- repository: Repository interfaces.
- service: Service layer.
- src/main/resources: Contains configuration files.
- application.properties: Application configuration.
- schema.graphqls: GraphQL schema definition.
- Clone the repository:
git clone https://github.com/koritsu/graphql-example.git cd graphql-example
- Build the project using Gradle:
./gradlew build
- Run the application:
./gradlew bootRun
- Access the GraphQL playground at
http://localhost:8080/graphiql
. - Example queries and mutations can be tested from the playground interface.
- Test the application at
http://localhost:8080
.