Forum Discussion

udaysqa9's avatar
udaysqa9
New Contributor
7 years ago

Hi Team,Can we test GraphQL request responses in SOAPUI ?

Graphql Requests contain query string and response is in JSON.

Any options available to test this in Soap UI ?

  • nmrao's avatar
    nmrao
    Champion Level 3
    How does a request look like?

    Is it some kind of database? If so, you should be able to query it provided it has the db driver.

    Any ways, provide more details of your use case.
    • udaysqa9's avatar
      udaysqa9
      New Contributor

      GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data.

       

      This is similar to REST request.But we have an option to test REST and SOAP request in Soapui tool.I wanted to know if there is any option to use soapUI for testing this.

       

      Example:

      Graphql API request url:

      http://localhost:4000/graphql?query=mutation{addCourse(title:"d",description:"d") {idtitle}}
       
      Graphql Response :
       
      {"data":{"addCourse":{"id":"5a17db8a36fd8f1748bf7ea0","title":"d"}}}
       
       
      Currently I am using Postman tool to do this.But soapUI would be excellent if it supports it.Not sure.
      • nmrao's avatar
        nmrao
        Champion Level 3
        udaysqa9, thank you for clarifying.

        Yes, you can use SoapUI tool for your testing. It also allows users to automate the functional tests.