Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

GraphiQL "subscriptionsClient.subscribe is not a function" #220

Closed
@RusticFlare

Description

@RusticFlare

The Bug

When I try to subscribe through GraphiQL I see this error:

Screen Shot 2019-03-26 at 11 13 25

My Setup

I have a schema

type Query {
    hello : String!
}

type Subscription {
    helloWorld : String!
}

and resolvers (in Kotlin)

import com.coxautodev.graphql.tools.GraphQLQueryResolver
import com.coxautodev.graphql.tools.GraphQLSubscriptionResolver
import org.reactivestreams.Publisher
import org.springframework.stereotype.Component
import reactor.core.publisher.Flux

@Component
class Query : GraphQLQueryResolver {
    fun hello() = "Hello World!"
}

@Component
class Subscription : GraphQLSubscriptionResolver {
    fun helloWorld(): Publisher<String> = Flux.just("Hello", "World!")
}

and dependencies in build.gradle

dependencies {
    compile 'com.graphql-java-kickstart:graphql-spring-boot-starter:5.7.0'
    runtime 'com.graphql-java-kickstart:graphiql-spring-boot-starter:5.7.0'
}

Extra Info

Queries Work

Screen Shot 2019-03-26 at 11 23 59

Subscriptions Work With Version 5.6.0

The last versions for subscriptions to work with GraphiQL seems to be 5.6.0:

dependencies {
    compile 'com.graphql-java-kickstart:graphql-spring-boot-starter:5.6.0'
    runtime 'com.graphql-java-kickstart:graphiql-spring-boot-starter:5.6.0'
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions