Using GraphQL without ability to point to a schema file
I have a problem to create a project that would work with multiple GraphQL API's in different environments - using ReadyAPI 3.5.1.
I can run individual GraphQL test requests fine with hard coded URL, but when I tried to add GraphQL API to the project (to use environment features) I'm blocked b/c I do not have access to the schema files - besides schemas are changing pretty frequently.
1. Is there a way to add GraphQL API to the project using End Point and Token to read the schema? Other applications like Altair doing that fine, but for some reason I do not see this option in ReadyAPI.
2. If #1 does not work, can I use for GraphQL's test requests an environment OR project property to specify URL for the GraphQL request for each environment?
Thank you for your interest in GraphQL support in ReadyAPI. Here are answers to your questions:
1. What you're looking for is the possibility to perform introspection against the GraphQL endpoint. Currently, this is not supported by ReadyAPI and the only way to provide your GraphQL API schema to ReadyAPI is to import a GraphQL SDL file either from the local drive or from the URL (if no authentication is required to access this file). I'll bring your interest in the introspection support to our Product Team's attention.
2. In ReadyAPI for each environment you can specify a new endpoint for your GraphQL interface as it's shown in the image below. If this is not what you're looking for, please clarify your question.
Natalie Customer Care Team
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Re: Using GraphQL without ability to point to a schema file
Hi NBorovyh, Natalie,
Thank you for your reply to my question.
For #1 - that is unfortunate since other tools I'm using doing that (read schema with provided end point and security token) fine.
For #2 - Few comments:
I'm dealing with multiple sub-systems that do not provide access to their schemas to me and without that I cannot create API and therefore I'm unable to change end-points for each environment as you suggested.
Even if I had access to their schema it would be a huge maintenance nightmare for me to track if any changes are done for any of the schemas - again, this info is not available for me.