Hacker News new | ask | show | jobs
by asabla 527 days ago
Why would you tho?

If you're working against an GraphQL based API, you should be able to pull a schema file. And use that to implement your own API.

All you would get from an Mitmproxy is example queries and mutations. With the additional complexity of extra tooling to stich together the schema file

2 comments

Pulling the schema file can, and often is, disabled server side. And GraphQL APIs can, and often do, decline to serve other than persisted queries, and those can't be really inferred even with known schema.
So I am working with a new company that has a ton of graphql queries. What I wanted to do was write an integration test for them in the fastest and easiest way possible.

I don't want to sit and read each query to identity where it is in the user flow. So I was thinking if I run this in the background and go through a happy flow, I can get the APIs in order and write an integration test.