Description
After creating scala GraphQL implementation I must admit, that the test quality and coverage of nodejs reference implemention is very good. In fact it helped me a lot during the development (as well as the reference implementation itself, of course). After re-implementing most of the tests in scala I now pretty confident, that most of the functionality is tested.
After seeing all these tests it become apparent to me, that there are a lot of edge cases and things that GraphQL library can get wrong, especially in terms of semantics, validation, execution, error handling, etc.. People are already created implementations in many different languages. I feel that it is important to create a TCK (Technology Compatibility Kit) for GraphQL specification in order to ensure success of GraphQL itself, higher adoption and growth of the ecosystem. Having implemented other specifications in the past, I must admit that a TCK makes specification implementation much easier and faster process. It also helps to adopt an implementation as specification evolves.
With TCK I mean a set of acceptance tests, that are distributed in some form (as a library, for instance) and can be used by library authors to verify, that their implementation confirms to the spec. Of course, TCK can't cover all of the cases, but at least it gives a good baseline and as ecosystem grows, it ensures that all parts of it remain compatible with each other or at least minimizes risk of incompatibility.
At the react-europe conference I had a short conversation with @schrockn about this topic. He said, that there are plans for something like this, so I wanted to follow-up here and ask for more information. Do you still have plans to create something like a TCK for GraphQL spec? If yes, do you already have an idea which form it will take? I guess implementing something like this can be a challenging task, considering that it suppose to test implementations written in different languages. As far as I saw, tests in the reference implementation are pretty generic - many of them take some query, execute it and then verify resulting JS object. At the moment they all implemented in terms of the nodejs implementation, but maybe they can be reused or extracted in the TCK somehow?