Skip to content

Unable to access GraphQL server and GraphiQL #19

Description

@sachink-2020

@eh3rrera

I am always having issue while launching the URL "http://localhost:8020/test" for graphql. My server is started.

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.

Thu Oct 08 11:14:21 EDT 2020
There was an unexpected error (type=Not Found, status=404).

Here are my application.properties
spring.application.name=demo-graphql
server.port=8020
spring.h2.console.enabled=true
spring.h2.console.path=/h2-console
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.username=SA
spring.datasource.password=

graphql.url=/test
graphql.servlet.enabled=true

graphiql.endpoint=/test
graphiql.mapping=/graphiql

gradle dependencies
plugins {
id 'org.springframework.boot' version '2.3.4.RELEASE'
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
id 'java'
}

group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '9'

repositories {
mavenCentral()
}

dependencies {

compile 'com.graphql-java-kickstart:graphql-java-servlet:7.4.0'
compile 'com.graphql-java:graphql-java-servlet:4.6.1'
implementation 'com.graphql-java:graphql-java:15.0'
implementation 'com.graphql-java-kickstart:graphql-spring-boot-starter:7.0.1'
implementation 'com.graphql-java-kickstart:graphql-java-servlet:9.1.0'

implementation 'com.graphql-java-kickstart:graphql-java-tools:5.6.0'
implementation 'org.springframework.boot:spring-boot-starter-web'
runtimeOnly 'com.h2database:h2'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
compileOnly 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}

test {
useJUnitPlatform()
}

Below is the error as well
IdeaProjects\demo-graphql\src\main\java\com\example\demo\exception\GraphQLErrorAdapter.java:31: error: incompatible types: Erro
rClassification cannot be converted to ErrorType
return error.getErrorType();

How to fix it?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions