top | item 42573202

(no title)

notcrazylol | 1 year ago

I was wondering how it would take in graphql endpoints and convert it to swagger, since its just a single POST API with change in params. But thats more of a swagger issue than the tools. Has anyone dealt with this? Would be really helpful if you could share your ideas too :)

discuss

order

asabla|1 year 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

jampekka|1 year ago

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.

notcrazylol|1 year ago

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.