Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use Paw as a GraphQL client

Tags:

paw-app

I've already used most popular GraphiQL client, but it lacks saving and categorizing queries.

Does Paw support making graphql request, and writing queries with auto-complete and type-hinting?

like image 339
Olim Saidov Avatar asked Jan 28 '23 09:01

Olim Saidov


2 Answers

Paw does work as a GraphQL client, but it's not as full-featured as you'd like. As far as I can tell, while you can make any kind of GraphQL request, it doesn't support any kind of auto-complete or type-hinting.


The GraphQL spec defines a way to query and execute data. However each website has their own way of letting you access that query interface.

For example, GitHub's API uses a POST request with a JSON payload to send almost all its GraphQL queries, but Facebook uses a more REST-like GET/POST/DELETE approach with path and query parameters.

Paw is more than capable of making and saving these types of requests.

Big queries

One thing to be aware of is that GraphQL requests can get large when trying to fetch multiple, nested data models (get me all the Comments on Posts that were written by User X). Having a large query inside a single field in Paw's can get unwieldy. I recommend using Paw's dynamic values and inserting a file that contains your GraphQL query. This way you can write your queries without having to jam them on a single line or use tons of escape sequences.

like image 63
Edward Loveall Avatar answered Feb 07 '23 20:02

Edward Loveall


As of Paw 3.2, GraphQL is now supported in the Body tab of a request.

With the ability to retrieve and explore the schema, via introspection.

like image 24
twilson Avatar answered Feb 07 '23 22:02

twilson