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:
- Clone this repository
- run
yarn
ornpm install
to install the depedencies - run
yarn start
ornpm start
to run the non-minified code. You will see the output line "Built" - run
yarn bug
ornpm run bug
to 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.