buildASTSchema() exists to parse a fully complete schema definition and produce a schema. However currently if it encounters an extend definition, or any other definition it does not use for that matter, it silently skips over it. This can lead to a confusing debugging situation.
Instead, buildASTSchema() should throw when it encounters a definition that it does not use, similar to how execute() throws if a the provided document contains any definition other than operations.
buildASTSchema()exists to parse a fully complete schema definition and produce a schema. However currently if it encounters anextenddefinition, or any other definition it does not use for that matter, it silently skips over it. This can lead to a confusing debugging situation.Instead,
buildASTSchema()should throw when it encounters a definition that it does not use, similar to howexecute()throws if a the provided document contains any definition other than operations.