Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

warn when creating a client without url (#512)

* warn when creating a client without url

* convert to throwing an error

authored by

Jovi De Croock and committed by
GitHub
4c75bf7e cd8ea77b

+3
+3
src/client.ts
··· 90 90 activeOperations = Object.create(null) as ActiveOperations; 91 91 92 92 constructor(opts: ClientOptions) { 93 + if (process.env.NODE_ENV !== 'production' && !opts.url) { 94 + throw new Error('You are creating an urql-client without a url.'); 95 + } 93 96 this.url = opts.url; 94 97 this.fetchOptions = opts.fetchOptions; 95 98 this.fetch = opts.fetch;