There seems to be an issue when using buildFederatedSchema while minified.
Per the documentation, when you're using federation, you are expected to use
the extend keyword on types that will be merged with other schemas:
extend type Query {
ping: String!
}
This syntax breaks when minified, causing the error:
Error: Cannot extend type "Query" because it is not defined.
Steps to replicate:
There seems to be an issue when using buildFederatedSchema while minified.
Per the documentation, when you're using federation, you are expected to use
the
extendkeyword on types that will be merged with other schemas:This syntax breaks when minified, causing the error:
Steps to replicate:
yarnornpm installto install the depedenciesyarn startornpm startto run the non-minified code. You will see the output line "Built"yarn bugornpm run bugto minify and run the minified code. The expected result would be to see "Built" again. The actual result is that it errors out with the aforementioned error.