smallrye / smallrye-graphql

Implementation for MicroProfile GraphQL
Apache License 2.0
155 stars 89 forks source link

Allow schema without operations if Federation is enabled #2113

Open jmartisk opened 2 months ago

jmartisk commented 2 months ago

Fixes https://github.com/smallrye/smallrye-graphql/issues/2110

jmartisk commented 2 months ago

@nicholassmith does this resolve your problem in https://github.com/smallrye/smallrye-graphql/issues/2110?

nicholassmith commented 2 months ago

I think it's a starting point, but after experimenting with manipulating the Operations when it invokes validateSchema in the GraphQLSchema::buildImpl() it's checking presence of a Query. Unfortunately that validate occurs prior to the Federation.transform which would populate the federation queries so it seems like some changes would be needed there as well.

jmartisk commented 2 months ago

Ah, right, I didn't notice. In that case though, that's something that would need fixing in graphql-java (https://github.com/graphql-java/graphql-java) - perhaps start a discussion there?