aerogear / graphql-testx

A GraphQL server for testing GraphQL applications or libraries based on Graphback
Apache License 2.0
15 stars 5 forks source link

Improve error message in the TestxDirector #95

Closed b1zzu closed 4 years ago

b1zzu commented 4 years ago

Steps to reproduce

  1. Create a TestxDirector with a wrong TestxController url
    const director = new TestxDirector("http://some.url:5555")
    await director.start()

    it will throw an error similar to this

    TypeError: Cannot read property 'data' of undefined
    at TestxDirector.eval (webpack:///./node_modules/graphql-testx/dist/src/TestxDirector.js?:27:60)
    at Generator.throw (<anonymous>)
    at rejected (webpack:///./node_modules/graphql-testx/dist/src/TestxDirector.js?:6:65)

    Expected result

    I would like to se a more explicity error, like the TestxController can not be reached on http://some.url:5555