-
Is there an option to hide certain queries and not publish them in the schema? For federation, we need many queries who should not be called directly. Would be nice if we could hide/exclude them from the schema. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
No, if it's not in the schema, it also will not be executable (at lease not from graphql). |
Beta Was this translation helpful? Give feedback.
-
You can ignore certain fields on object, to not be exposed on the graphql side, see https://download.eclipse.org/microprofile/microprofile-graphql-1.0/microprofile-graphql.html#ignorable_fields |
Beta Was this translation helpful? Give feedback.
-
IIUC, it's only just two extra queries, isn't it? |
Beta Was this translation helpful? Give feedback.
But this
resolveFederationPrice
method does resolve aProduct
! It's just not the full Product but only the "view" that thePrice
service has about the product: a product with an id and a price. If you give it the same name that theProduct
(or any other) service uses, e.g.product
orproductById
, you'll have only a single query in the schema!