smallrye / smallrye-graphql

Implementation for MicroProfile GraphQL
Apache License 2.0
160 stars 91 forks source link

Inconsistent enablement of Federation #1689

Open t1 opened 1 year ago

t1 commented 1 year ago

In 1.9.1, enabling Federation is not automatic any more and is only possible with a system property

jmartisk commented 1 year ago

No, it's automatic, at least it will be when quarkus updates to SmallRye GraphQL 1.9.1/2.0.1 via this PR: https://github.com/quarkusio/quarkus/pull/30227/files (see SmallRyeGraphQLProcessor#activateFederation)

For WildFly, I am going to do something similar.

jmartisk commented 1 year ago

I want to make the automatic enablement handled by the runtime, not directly in SmallRye, because different runtimes have different configuration mechanisms - for example Quarkus has its own configuration property for enabling federation (quarkus.smallrye-graphql.federation.enabled), and I want Quarkus to decide based on THAT property, not based only on smallrye.graphql.federation.enabled, so the plan is that Quarkus will set the value of smallrye.graphql.federation.enabled by itself, and then the SchemaBuilder will be controlled by that value.

t1 commented 1 year ago

Okay, I see... but wouldn't it make more sense to implement it once? Have you seen #1690

jmartisk commented 1 year ago

I've commented on the PR, I think it might make sense, but it would need some changes, let's move the discussion there