Building a GraphQL Server Test Client - Part 20

preview_player
Показать описание
Learn how to create a test client to test out a GraphQL server.

----
Video Suggestions:

----
Follow Me Online Here:

----
#benawad

----
#benawad
Рекомендации по теме
Комментарии
Автор

I gotta say this is the video that I enjoyed the most until now. Usually when we need to refactor its boring and all that, thats why so many people doing videos usually don't to it, that's why you are much better than them and I appreciate so much that you took your time to refactor all this in such a nice way, also we take a peek at classes in js which are so nice coming from java it is so familiar. Really you killed this one!

rubinskyzlatrovich
Автор

Great video, I want to suggest something: Instead of passing the url by parameter, in the TestClient constructor you can place this.url = process.env.TEST_HOST. If you need to add something to that url later, then it would be something like: this.url = process.env.TEST_HOST + url. So, when the TestClient instance is created 'TestClient('the rest of the url')' you add whatever is missing.

juansereina_
Автор

I've got to agree Ben, this is one of the best sessions yet! Great insights. It's one of those things .... you know it can be re-factored because of duplicate or near duplicate code .... this is so clean! Keep up the awesome work!

neiljones
Автор

at 2020, request-promise is deprecated and so we have to use the alternatives. any recommendation? :)

amanlearnscode
Автор

Is there some way to use a graphql file in intead of strings ? Thanks

oroneki