swift-graphql icon indicating copy to clipboard operation
swift-graphql copied to clipboard

GraphQL: Mock request support for testing

Open shaps80 opened this issue 1 year ago • 2 comments

@maticzav this is really a question for you to begin with.

I had trouble (as have others) running the tests since we don't seem to be able to get the local server running.

However I wonder why we even need to take that approach? I was thinking making use of URLProtocol would be far simpler and make it easier to run tests, directly from Xcode.

Can you comment on this, as perhaps I'm missing the point here ;)

shaps80 avatar Oct 27 '23 12:10 shaps80

Yes!

I am totally for having a mock interface and doing it right.

The way I've done it in the past is hosting a server and then using that but Render became too expensive at one point and I had to shut it down.

maticzav avatar Oct 30 '23 11:10 maticzav

Yeah, in general, it's a far more involved approach to use a server. I'll take a look into this then. Thanks. Appreciate the feedback a lot

shaps80 avatar Oct 30 '23 13:10 shaps80