Relay modern: Testing queries. – Hacker Noon


We need to execute a query against a graphql schema to understand that everything is ok with the query. The only way to check that is to use parseGraphQLText from relay-test-utils library. We need to call that function with a schema and a query text. If an error is thrown it means that query has some issues, otherwise this function just stay silent.

That’s all. Pretty simple and straightforward! If you like this story like and share it 🙂 Piece.

read original article here