test: add test case to ensure it works with msw graphql link #66
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, regarding issue#63
I would like to propose an update to the library about supporting multiple endpoints for GraphQL use cases.
After testing the official msw feature graphql.link, I discovered that this library can already work with this API. As a result, I have added an integration test and made minor UI adjustments to the example settings-form page to provide an example and testing for this use case.
Related source code in msw:
For other considerations like register & unreqister routes based on the path, so far msw set the edpoint property in graphql handler as private. We can not directly access to this attribute (or we just use it and ignore the ts error).
Another possible but hacky way is getting it from parsing header.
Please let me know that which solution you prefer or if you have any other advises.