apollographql / federation-subgraph-compatibility

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve reporting of reasons for warnings and failures

darrellwarde opened this issue · comments

If debug mode is not enabled, an example of the output for a test run with some warnings and failures is in this file:

report.txt

Whilst it informs you that some tests have failed or have warnings, it doesn't give you any indication of why this is the case.

With debug enabled, the logging output is so verbose that it is hard to fish out the reasons for warnings and failures.

I think it would be a great improvement if by default, the GitHub Action logged the output for failing tests and tests with warnings, so that users can begin debugging directly from the browser, rather than having to pull down the code and run the tests with the npm script (which I guess could have different results from being run in different environments).

As a first implementation, the Jest output would suffice, but I think there is further room for improvement here because some of the snapshot log output makes it hard to discern what the actual differences between schemas are. I would say there is an opportunity to use something like GraphQL Inspector here to compare the expected against the actual schema, but I realise this is likely outside the scope of this Action!

v1.3.1 includes Jest output by default (without the need for very verbose debug output). I also updated router config to propagate subgraph error information (previously it was reporting those as "redacted").