Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL: Mock request support for testing #183

Open
shaps80 opened this issue Oct 27, 2023 · 2 comments
Open

GraphQL: Mock request support for testing #183

shaps80 opened this issue Oct 27, 2023 · 2 comments
Labels
question Further information is requested

Comments

@shaps80
Copy link
Collaborator

shaps80 commented Oct 27, 2023

@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 shaps80 added the question Further information is requested label Oct 27, 2023
@maticzav
Copy link
Owner

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.

@shaps80
Copy link
Collaborator Author

shaps80 commented Oct 30, 2023

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 shaps80 changed the title Testing with mocked requests GraphQL: Mock request support for testing Jan 12, 2024
@shaps80 shaps80 moved this to Todo in SwiftGraphQL v6 Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: Todo
Development

No branches or pull requests

2 participants