movio / bramble

A federated GraphQL API gateway
https://movio.github.io/bramble/
MIT License
497 stars 53 forks source link

Types not used in any query are not getting into compiled schema? #175

Closed benzolium closed 1 year ago

benzolium commented 1 year ago

I'm defining types which are not used in any query. I could see them in the downstream service, but not in the compiled schema.

I'm expecting them to be in the compiled schema so frontend could see those types through gateway.

Is it a bug or is it inеended?

pkqk commented 1 year ago

Hi @benzolium this is intentional, bramble only exposes types from the schema that are exposed via queries, mostly because we thought it good practice to not federate info that is inaccessible.

Have you got a use case for extra types that aren't used in the schema?

benzolium commented 1 year ago

@pkqk oh, ok. Thanks.

Yeah, I have such case. But actually, I have just made a dummy query returning those types. So not a big deal.