![]() If you are familiar with Postman and testing REST endpoints there will be just few adjustments to write test cases for GraphQL endpoint. Of course that Postman has a feature allowing testing GraphQL! Playground IDE is available on local development on localhost:4000/graphql or can be also enabled in production by passing “playground: true “ to server instance as on a GraphQl server I was working on. ![]() One of my favourite Playground features is keyboard shortcut CTRL + Space allowing access all available commands based on your current context. Playground allows also testing with variables (convenient way for developers to build query this way and then just copy it to code base), HTTP headers etc. Allows work on multiple tabs so working on different test cases. ![]() Intelligent features of Playground allow quickly identify issue with query (syntax, real-time error highlighting), accessing endpoint documentation and schema. It is interface allowing user to test queries, mutations and subscriptions. The easiest and provided by default from GraphQL endpoint (using Apollo Server) testing tool is GraphQL IDE - Playground. deleteTea etc) that are ready to be tested. The endpoint that I am using is the collection of teas has few basic methods available ( teas, teaByid, producers, addTea. Recently I started my personal project to learn how to build and test GraphQL server. GraphQL, Postman, Supertest, API testing - 2 min read Testing GraphQL (Playground, Postman, Supertest/Chai)
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |