Closed Astn closed 7 years ago
Hi @Astn, thanks for the first issue of the lib :). Please note that even if it does the job, it is still not production-ready. I was planning to include semantic-toolkit as a dependency to perform this kind of check (and support blank nodes and many other semantic features). You will find your fix in it !
First off, thank you for open sourcing this project! I have found that is has already saved me and my company a lot of time! Thank you for all the work you put into this!
According to https://tools.ietf.org/html/rfc3987#section-2.2 An IRI must start with a SCHEME followed by a ":"
Where
Currently isIRI is checking that:
Given that IRI is a superset of URI, the examples from URI @ https://tools.ietf.org/html/rfc3986#section-1.1.2 show that all of the following should pass the isIRI check.
I suggest that for we replace
with
I believe this would be a significant step forward.
If its determined that even further improvements be made, I would suggest that we ensure that the scheme portion does not include any of the reserved characters. see:
I can submit a pull request for this shortly, and have been working on a few fixes like this in the following fork : https://github.com/athlinks/semantic-graphql/tree/addUnionSupport