This repository was archived by the owner on May 22, 2025. It is now read-only.
TheGraph Connector: Parse subgraph URL in GraphQLWrapper to catch invalid URLs#47
Merged
TheGraph Connector: Parse subgraph URL in GraphQLWrapper to catch invalid URLs#47
Conversation
Codecov Report
@@ Coverage Diff @@
## master #47 +/- ##
==========================================
+ Coverage 28.10% 28.15% +0.05%
==========================================
Files 53 53
Lines 861 863 +2
Branches 145 146 +1
==========================================
+ Hits 242 243 +1
- Misses 619 620 +1
Continue to review full report at Codecov.
|
bpierre
approved these changes
Jun 17, 2020
Co-authored-by: Pierre Bertet <hello@pierre.world>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
From version
0.1to0.2we had a behavior change with urql as it now errors silently if it doesn't have an URL to work with, leading the library to throw a very obscurecannot read property replace of undefined. This PR detects if there's no URL passed in, or if it's not valid (doesn't containhttp, as we're assuming this down below for creating subscriptions) and throws an error with a more meaningful description.We could also start thinking about making our own errors, extending them from the
Errorclass, akin to howweb3-reacthandles this.