-
Notifications
You must be signed in to change notification settings - Fork 311
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
Support passing relative path for URL #745
Comments
If it only happens after you bundle then I think it's an issue in your project. What is the value of |
Is the same URL I use with version graphql-request version is the only thing I change. |
It might be a breaking change in Does your target runtime (browser?) have a global |
Yes
Nope, all default. I'm using it like this with both versions: export const client = new GraphQLClient("/graphql", {
fetch: createPersistedQueryFetch(fetch) // from from https://github.com/jasonkuhrt/graphql-request/issues/269
}); |
Interesting, |
Failed to construct 'URL': Invalid URL
error when building for production
It works if I use |
I think being explicit here is less confusing and makes for a better API, because we can validate that a valid URL is passed catching more user errors. Upon release, I'll try to remember to mention this breaking change! |
I just found out another quirk this time with
7.0.0-next.33
.But this time only when I build my bundle for production:
An extract of
index.pxZNWVDZ.js:51:1995
(let l=new URL(n.url)
is the stack trace indication):The text was updated successfully, but these errors were encountered: