Skip to content

Commit

Permalink
fix: update federated hooks to support flow
Browse files Browse the repository at this point in the history
As of v2.4, Federation supports subscriptions. Our servers automatically configure hooks for subscription `Flow` support for non-federated schemas. We should update federated hooks to also support `Flow`.

Resolves: #1862
  • Loading branch information
dariuszkuc committed Oct 8, 2023
1 parent 46f2994 commit dc94748
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ import com.expediagroup.graphql.generator.federation.types.SERVICE_FIELD_DEFINIT
import com.expediagroup.graphql.generator.federation.types._Service
import com.expediagroup.graphql.generator.federation.types.generateEntityFieldDefinition
import com.expediagroup.graphql.generator.federation.validation.FederatedSchemaValidator
import com.expediagroup.graphql.generator.hooks.SchemaGeneratorHooks
import com.expediagroup.graphql.generator.hooks.FlowSubscriptionSchemaGeneratorHooks
import graphql.TypeResolutionEnvironment
import graphql.schema.DataFetcher
import graphql.schema.FieldCoordinates
Expand All @@ -97,7 +97,7 @@ import kotlin.reflect.full.findAnnotation
open class FederatedSchemaGeneratorHooks(
private val resolvers: List<FederatedTypeResolver>,
private val optInFederationV2: Boolean = true
) : SchemaGeneratorHooks {
) : FlowSubscriptionSchemaGeneratorHooks() {
private val validator: FederatedSchemaValidator = FederatedSchemaValidator()
data class LinkSpec(val namespace: String, val imports: Map<String, String>)
private val linkSpecs: MutableMap<String, LinkSpec> = HashMap()
Expand Down

0 comments on commit dc94748

Please sign in to comment.