{"name":"urql","version":"0.3.0-next4","description":"A naive React Graphql library","main":"lib/index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"types/index.d.ts","scripts":{"coverage":"jest --coverage","clean-lib":"rimraf lib","build-babel":"babel src --extensions \".ts,.tsx\"","build-lib":"npm run clean-lib && builder run --env \"{\\\"BABEL_ENV\\\":\\\"commonjs\\\"}\" build-babel -- -d lib","build-bundles":"rollup -c","clean-es":"rimraf es","build-es":"npm run clean-es && builder run build-babel -- -d es","watch-es":"watch \"npm run build-es\" src/ -d","clean-types":"rimraf types","build-types":"npm run clean-types && tsc -p tsconfig.dts.json","build":"builder concurrent --buffer build-lib build-es build-types","demo:start:graphql-server":"node example/src/server/index.js","demo:start:app":"webpack-dev-server --hot --inline --config \"example/webpack.config.js\"","demo:start":"builder concurrent demo:start:app demo:start:graphql-server","type-check":"tsc","lint":"tslint 'src/**/*.{ts, tsx}'","test":"jest","bundlesize":"bundlesize","prettier":"prettier --write \"{,!(node_modules|custom-typings|types)/**/}*.{js,jsx,ts,tsx,json,md}\"","precommit":"lint-staged"},"author":{"name":"Ken Wheeler"},"license":"MIT","resolutions":{"babel-core":"^7.0.0-bridge.0"},"jest":{"setupFiles":["./src/tests/setup.js"],"transform":{"^.+\\.tsx?$":"<rootDir>/node_modules/babel-jest"},"collectCoverageFrom":["src/**/*.{ts,tsx}","!src/tests/**/*","!src/interfaces/**/*","!src/index.*","!src/**/hash.*","!src/**/typenames.*"],"testRegex":"(src/tests/.*(\\.|/)(test|spec))\\.(jsx?|tsx?)$","moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"lint-staged":{"*.{js,jsx,ts,tsx,json,md}":["prettier --write","git add"]},"bundlesize":[{"path":"./bundles/urql.es.min.js","maxSize":"8 kB"}],"devDependencies":{"@babel/cli":"^7.0.0-beta.38","@babel/core":"^7.0.0-beta.38","@babel/plugin-proposal-class-properties":"^7.0.0-beta.38","@babel/plugin-proposal-pipeline-operator":"^7.0.0-beta.38","@babel/plugin-syntax-object-rest-spread":"^7.0.0-beta.38","@babel/plugin-transform-modules-commonjs":"^7.0.0-beta.40","@babel/polyfill":"^7.0.0-beta.38","@babel/preset-env":"^7.0.0-beta.38","@babel/preset-react":"^7.0.0-beta.38","@babel/preset-stage-3":"^7.0.0-beta.38","@babel/preset-typescript":"^7.0.0-beta.38","@types/graphql":"^0.12.1","@types/jest":"^22.0.1","@types/react":"^16.0.34","@types/react-dom":"^16.0.3","@types/uuid":"^3.4.3","babel-jest":"^22.1.0","babel-loader":"8.0.0-beta.0","babel-plugin-module-resolver":"^3.0.0","builder":"^3.2.3","bundlesize":"^0.17.0","cors":"^2.8.4","coveralls":"^3.0.0","enzyme":"^3.3.0","express":"^4.16.2","express-graphql":"^0.6.11","graphql-tools":"^2.18.0","husky":"^0.14.3","isomorphic-fetch":"^2.2.1","jest":"^22.1.4","lint-staged":"^6.0.1","prettier":"1.10.2","prop-types":"^15.6.0","react":"^16.0.0-0","react-addons-test-utils":"^15.6.2","react-dom":"^16.0.0-0","react-test-renderer":"^16.2.0","regenerator-runtime":"^0.11.1","rimraf":"^2.6.2","rollup":"^0.58.2","rollup-plugin-babel":"^4.0.0-beta.4","rollup-plugin-commonjs":"^9.1.3","rollup-plugin-node-resolve":"^3.3.0","rollup-plugin-replace":"^2.0.0","rollup-plugin-sourcemaps":"^0.4.2","rollup-plugin-typescript2":"^0.13.0","rollup-plugin-uglify":"^3.0.0","tslint":"^5.9.1","tslint-config-prettier":"^1.6.0","tslint-react":"^3.4.0","typescript":"~2.7.2","uuid":"^3.2.1","webpack":"^3.10.0","webpack-dev-server":"^2.11.0"},"peerDependencies":{"prop-types":"^15.6.0","react":"^16.0.0-0","react-dom":"^16.0.0-0"},"dependencies":{"create-react-context":"^0.1.3","graphql":"^0.13.1","hoist-non-react-statics":"^2.5.0","zen-observable-ts":"^0.8.9"},"sideEffects":false,"readmeFilename":"README.md","readme":"# urql\n\nUniversal React Query Library\n\n[![Build Status](https://travis-ci.org/FormidableLabs/urql.svg?branch=master)](https://travis-ci.org/FormidableLabs/urql) [![Build status](https://ci.appveyor.com/api/projects/status/01arsdnaxm28ogwg?svg=true)](https://ci.appveyor.com/project/kenwheeler/urql)\n[![Coverage Status](https://coveralls.io/repos/github/FormidableLabs/urql/badge.svg?branch=master)](https://coveralls.io/github/FormidableLabs/urql?branch=master) [![npm](https://img.shields.io/npm/v/urql.svg)]() [![npm](https://img.shields.io/npm/l/urql.svg)]()\n\n![Urkel](https://images-production.global.ssl.fastly.net/uploads/posts/image/97733/jaleel-white-steve-urkel.jpg)\n\n* [What is `urql`](#what-is-urql)\n* [Why this exists](#why-this-exists)\n* [How its different](#how-its-different)\n* [Install](#install)\n* [Getting Started](#getting-started)\n* [Cache control](#cache-control)\n* [Custom Caches](#custom-caches)\n* [API](#api)\n  * [Client](#client)\n  * [Provider](#provider)\n  * [Connect](#connect)\n    * [Props](#props)\n    * [Render Args](#render-args)\n  * [ConnectHOC](#connecthoc)\n  * [query](#query)\n  * [mutation](#mutation)\n  * [CombinedError](#combinederror)\n  * [Exchanges](#exchanges)\n* [Prior Art](#prior-art)\n\n## What is `urql`\n\n`urql` is a GraphQL client, exposed as a set of ReactJS components.\n\n## Why this exists\n\nIn my experience, existing solutions have been a bit heavy on the API side of things, and I see people getting discouraged or turned away from the magic that is GraphQL. This library aims to make GraphQL on the client side as simple as possible.\n\n## How it's different\n\n### React\n\n`urql` is specifically for React. There have been no efforts made to abstract the core in order to work with other libraries. Usage with React was a priority from the get go, and it has been architected as such.\n\n### Render Props\n\n`urql` exposes its API via render props. Recent discussion has shown render props to be an extraordinarily flexible and appropriate API decision for libraries targeting React.\n\n### Caching\n\n`urql` takes a unique approach to caching. Many existing solutions normalize your data and parse your queries to try to invalidate cached data. I am not smart enough to implement this solution, and further, normalizing everything, on big datasets, can potentially lead to performance/memory issues.\n\n`urql` takes a different approach. It takes your query signature and creates a hash, which it uses to cache the results of your query. It also adds `__typename` fields to both queries and mutations, and by default, will invalidate a cached query if it contains a type changed by a mutation. Further, handing control back to the users, it exposes a `shouldInvalidate` prop, which is a function that can be used to determine whether the cache is invalid based upon typenames, mutation response and your current data.\n\n## Install\n\n`npm install urql --save`\n\n## Getting Started\n\nIf you want to get right down to business and try a working example of `urql` in action, check out this Code Sandbox:\n\n[https://codesandbox.io/s/p5n69p23x0](https://codesandbox.io/s/p5n69p23x0)\n\nThe core of `urql` is three exports, `Provider`, `Connect` and `Client`. To get started, you simply create a `Client` instance, pass it to a `Provider` and then wrap any components you want to make queries or fire mutation from with a `Connect` component. We also provide a `ConnectHOC` higher order component, if you happen to not enjoy the absolutely amazing explicit nature of render props.\n\nLets look at a root level component and how you can get it set up:\n\n```jsx\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { Provider, Client } from 'urql';\nimport Home from './home';\n\nconst client = new Client({\n  url: 'http://localhost:3001/graphql',\n});\n\nexport const App = () => (\n  <Provider client={client}>\n    <Home />\n  </Provider>\n);\n\nReactDOM.render(<App />, document.getElementById('root'));\n```\n\nAs you can see above, all that's required to get started is the `url` field on `Client` which tells us where your GraphQL API lives. After the client is created, and passed to the `Provider` that wraps your app, now you can wrap any component down in the tree with a `Connect` to start issuing queries.\n\nQueries and mutations both have creation functions, which you can import. An `urql` `Connect` component can take multiple queries, and multiple mutations. The `render` prop exposes the internal logic to any component you'd like to provide it to.\n\nLets start by defining a query and a mutation:\n\n```javascript\nconst TodoQuery = `\nquery {\n  todos {\n    id\n    text\n  }\n}\n`;\n```\n\n## HOLD UP FAM THIS IS IMPORTANT\n\nIt is absolutely necessary if you want this library to work properly, to create a valid mutation response. If you change a todo, return it. If you delete a todo, return it. If you add a todo, return it. If you don't return the thing that changed and file an issue, I'm going to screenshot this paragraph, paste it into the issue, and then drop my finger from a 3ft height onto the close button while making plane crash sounds.\n\n```javascript\nconst AddTodo = `\nmutation($text: String!) {\n  addTodo(text: $text) {\n    id\n    text\n  }\n}\n`;\n```\n\nNow we can use the `mutation` and `query` functions to format them in the way `urql` expects.\n\n```javascript\nconst Home = () => (\n  <Connect\n    query={query(TodoQuery)}\n    mutation={{\n      addTodo: mutation(AddTodo),\n    }}\n    children={({ loaded, fetching, refetch, data, error, addTodo }) => {\n      //...Your Component\n    }}\n  />\n);\n```\n\nYou can also use functional child style:\n\n```javascript\nconst Home = () => (\n  <Connect\n    query={query(TodoQuery)}\n    mutation={{\n      addTodo: mutation(AddTodo),\n    }}\n  >\n    {({ loaded, fetching, refetch, data, error, addTodo }) => {\n      //...Your Component\n    }}\n  </Connect>\n);\n```\n\nThe `children` render prop sends a couple of fields back by default:\n\n* `loaded` - This is like `loading` but it's false by default, and becomes true after the first time your query loads. This makes initial loading states easy and reduces flicker on subsequent fetch/refetches.\n* `fetching` - This is what you might commonly think of as `loading`. Any time a query or mutation is taking place, this puppy equals true, resolving to false when complete.\n* `refetch` - This is a method that you can use to manually refetch your query. You can skip the cache, hit the server and repopulate the cache by calling this like `refetch({ skipCache: true })`.\n* `refreshAllFromCache` - This is a method that you can use to manually refetch all queries from the cache.\n* `data` - This is where your data lives. Once the query returns, This would look like `{ todos: [...] }`.\n* `error` - If there is an error returned when making the query, instead of data, you get this and you can handle it or show a `refetch` button or cry or whatever you wanna do.\n\nAlso, any mutations, because they are named, are also passed into this render prop.\n\nAs you can see above, the `query` accepts either a single query, or an array of queries. The `mutation` prop accepts an object, with the mutation names as keys.\n\nSo why do we use these `query` and `mutation` functions before passing them? Variables, thats why. If you wanted to pass a query with variables, you would construct it like so:\n\n```javascript\nimport { query } from 'urql';\n\nquery(TodoQuery, { myVariable: 5 });\n```\n\nSimilarly, you can pass variables to your mutation. Mutation, however is a bit different, in the sense that it returns a function that you can call with a variable set:\n\n```javascript\nimport { mutation } from 'urql';\n\nmutation(AddTodo); // No initial variables\n\n// After you pass 'addTodo' from the render prop to a component:\n\naddTodo({ text: `I'm a variable!` });\n```\n\n## Cache control\n\nNormally in `urql`, the cache is aggressively invalidated based upon `__typename`, but if you want finer grained control over your cache, you can use the `shouldInvalidate` prop. It is a function, that returns a boolean, much like `shouldComponentUpdate`, which you can use to determine whether your data needs a refresh from the server. It gets called after every mutation:\n\n```javascript\nconst MyComponent = () => (\n  <Connect\n    query={query(MyQuery)}\n    shouldInvalidate={(changedTypenames, typenames, mutationResponse, data) => {\n      return data.todos.some(d => d.id === mutationResponse.id);\n    }}\n    children={({ loaded, fetching, refetch, data, error, addTodo }) => {\n      //...Your Component\n    }}\n  />\n);\n```\n\nThe signature of `shouldInvalidate` is basically:\n\n* `changedTypenames` - The typenames returned from the mutation. ex: `['Todo']`\n* `typenames` - The typenames that are included in your `Connect` component. ex: `['Todo', 'User', 'Author']`\n* `response` - The actual data returned from the mutation. ex: `{ id: 123 }`\n* `data` - The data that is local to your `Connect` component as a result of a query. ex: `{ todos: [] }`\n\nUsing all or some of these arguments can give you the power to pretty accurately describe whether your connection has now been invalidated.\n\n## Custom Caches\n\nThe `Client` constructor accepts a `cache` setting where you can provide your own caching mechanism that will work with `urql`. By default, we use a local object store, but you can provide an adapter for whatever you want.\n\nIf you want to supply your own cache, you'll want to provide an object with the following keys:\n\n* `invalidate` - `(hash) => Promise`, invalidates a cache entry.\n* `invalidateAll` - `() => Promise`, basically clears the store.\n* `read` - `(hash) => Promise`, reads and returns a cache entry\n* `update` - `(callback: (store, key, value)) => Promise`, iterates over cache entries and calls the supplied callback function to provide update functionality\n* `write` - `(hash, data) => Promise`, writes a value to the store.\n\nDon't worry about the hashes, we convert query objects(query + variables) to the hash behind the scenes. Here is an example of the cache creation function we use internally for reference:\n\n```javascript\nconst defaultCache = store => {\n  return {\n    invalidate: hash =>\n      new Promise(resolve => {\n        delete store[hash];\n        resolve();\n      }),\n    invalidateAll: () =>\n      new Promise(resolve => {\n        store = {};\n        resolve();\n      }),\n    read: hash =>\n      new Promise(resolve => {\n        resolve(store[hash] || null);\n      }),\n    update: callback =>\n      new Promise(resolve => {\n        if (typeof callback === 'function') {\n          Object.keys(store).map(key => {\n            callback(store, key, store[key]);\n          });\n        }\n        resolve();\n      }),\n    write: (hash, data) =>\n      new Promise(resolve => {\n        store[hash] = data;\n        resolve();\n      }),\n  };\n};\n```\n\n## API\n\n### Client\n\n#### Options\n\n| Name              | Value                               | Description                                                                                                                                                          |\n| ----------------- | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| url               | `string`                            | The URL that the Client should connect to _(required)_                                                                                                               |\n| initialCache      | `object`                            | An initial state for your cache if you are using the default cache. This probably won't get much play until SSR is implemented                                       |\n| cache             | `ICache`                            | Instance of an `ICache` if you want to build your own custom one built with something like `AsyncStorage`. You can read more about how to create one of these above. |\n| fetchOptions      | `object` or `() => object`          | Options provided to the internal `fetch` calls which can either be an object or a function if you want to provide dynamic values like a token header.                |\n| transformExchange | `(IExchange, IClient) => IExchange` | A function that receives the default \"Exchange\" and the client, and returns a new exchange. Use this to customise how the client handles GraphQL requests.           |\n\n#### Description\n\nClient is the constructor for your GraphQL client. It takes a configuration object as an argument, which is required.\nYou can read more about the individual options above. Please note that providing a `url` property for your GraphQL API endpoint is required.\n\nExample:\n\n```javascript\nconst client = new Client({ url: 'http://localhost:3000/graphql' });\n```\n\nWith `transformExchange` you can completely customise how the `urql` client handles a `GraphQL` operation.\nRead more about this in the [\"Exchanges\"](#exchanges) section.\n\n### Provider\n\nProvider is a ReactJS component that is used to provide the `urql` client throughout your application.\n\nExample:\n\n```javascript\nconst client = new Client({ url: 'http://localhost:3000/graphql' });\n//...\nreturn (\n  <Provider client={client}>\n    <YourApp />\n  </Provider>\n);\n```\n\n### Connect\n\nConnect is a ReactJS component that is used to execute queries and mutations and render child components with the results, using a render prop.\n\n#### Props\n\n| Name             | Value                                                                        | Default    | Description                                                                    |\n| ---------------- | ---------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------ |\n| query            | `QueryObject or [QueryObject]`                                               | `null`     | The query/queries you want connected to your component                         |\n| mutation         | `MutationMap`                                                                | `null`     | The mutation/mutations you want connected to your component                    |\n| cache            | `boolean`                                                                    | `true`     | Whether this component's queries should be cached                              |\n| typeInvalidation | `boolean`                                                                    | `true`     | Whether this component's cache should be invalidated using typeNames           |\n| shouldInvalidate | `(changedTypes, componentTypes, mutationResponse, componentData) => boolean` | `null`     | Function used to determine whether the component's cache should be invalidated |\n| children         | `({RenderArgs})`                                                             | RenderArgs | Render prop used to render children                                            |\n\n#### Render Args\n\nThe following fields are present on the render functions argument object:\n\n| Name                | Value           | Default    | Description                                                                                            |\n| ------------------- | --------------- | ---------- | ------------------------------------------------------------------------------------------------------ |\n| cache               | `object`        | Cache      | Provides cache operations, defined below                                                               |\n| fetching            | `boolean`       | `false`    | Fetching is true during any pending query or mutation operation                                        |\n| loaded              | `boolean`       | `false`    | Becomes true once the component gets data for the first time.                                          |\n| error               | `CombinedError` | `null`     | Any CombinedErrors thrown during a query or mutation ([see below](#combinederror))                     |\n| data                | `object`        | `null`     | Any data returned as the result of a query                                                             |\n| refetch             | `function`      | `function` | Function used to refetch existing queries, can skip cache by calling with `{skipCache: true}` argument |\n| refreshAllFromCache | `function`      | `function` | Function used to refetch all queries from the cache.                                                   |\n\nThe `cache` object provides several helpful cache methods that you can use to control the cache:\n\n* `invalidate` - `invalidate` takes an optional QueryObject parameter, but defaults to invalidating the queries defined on the component.\n* `invalidateAll` - Basically clears your entire cache.\n* `read` - Takes a QueryObject parameter, returns cache value for that query.\n* `update` - Takes a callback function with an argument shape of `(store, key, value)`. The callback function is run against every cache entry, giving you the opportunity to update any given value based upon the context of the current data shape.\n\nIn addition to these, any specified mutations are also provided as their key in the mutation map. Mutations are functions that accept an object of variables as an argument and return a `Promise` which resolves to the data the mutation asked for.\n\nExample:\n\n```jsx\n<Connect\n  query={query(MyQuery)}\n  children={({loaded, data}) => {\n    return loaded ? <Loading/> : <List data={data.todos}>\n  }}\n/>\n\n// with mutations\n\n<Connect\n  mutation={{\n    addTodo: mutation(AddTodo)\n  }}\n  children={({ addTodo }) => {\n    return <button type=\"button\" onClick={addTodo}>Add Todo</button>\n  }}\n/>\n```\n\n### ConnectHOC\n\n_(options: object | (props) => object) => (Component)_\n\nConnectHOC is a higher order component that essentially does the same thing as the `Connect` component. All of `Connect`'s props except for `render` are valid for the `options` object. Further, you can specify a function, which will provide the component's props and return a dynamic option set. The arguments you'd see in the `render` prop in `Connect` are passed automatically to the wrapped component.\n\nExample:\n\n```javascript\nexport default ConnectHOC({\n  query: query(TodoQuery)\n})(MyComponent);\n\n// or\n\nexport default ConnectHOC((props) => {\n  query: query(TodoQuery, { id: props.id })\n})(MyComponent);\n```\n\n### query\n\n_(query: string, variables?: object) => {query: string, variables: object}_\n\n`query` is a QueryObject creator.\n\nExample:\n\n```javascript\nquery(\n  `\nquery($id: ID!) {\n  todos(id: $id) {\n    text\n  }\n}`,\n  { id: 5 }\n);\n```\n\n### mutation\n\n_(query: string, variables?: object) => {query: string, variables: object}_\n\n`query` is a MutationObject creator.\n\nExample:\n\n```javascript\nmutation(\n  `\nmutation($id: ID!) {\n  addTodo(id: $id) {\n    text\n  }\n}`,\n  { id: 5 }\n);\n```\n\n### CombinedError\n\nCombinedError displays a list of all network and GraphQL errors that have occured during a GraphQL request.\n\n_No GraphQL errors will be present if a network error has occured_\n\nThe following fields are present within a CombinedError:\n\n| Name          | Value         | Description                          |\n| ------------- | ------------- | ------------------------------------ |\n| networkError  | Error         | Network error if fetch has failed    |\n| graphQLErrors | Error[]       | GraphQL errors from the API response |\n| reponse       | FetchResponse | Raw Response instance                |\n\n### Exchanges\n\nAn **“Exchange”** is a function that accepts an operation and returns an observable with\nthe GraphQL query’s result. Any operation, like queries or mutations, flow through the exchange\nand are processed by it.\n\nThe most important exchange is the `httpExchange`. It sends operations to your API and returns\nan observable with the actual result. `urql` comes with two more exchanges by default:\n\n* `dedupExchange`: Takes an exchange and returns a new one that deduplicates in-flight requests\n* `cacheExchange`: Reads query-operations from the cache and writes results to the cache\n\nBy default urql will create a default exchange using all three, which looks like this:\n\n```javascript\nlet exchange;\nexchange = httpExchange();\nexchange = dedupExchange(exchange);\nexchange = cacheExchange(this.cache, exchange);\n```\n\nThis means that by default `urql` will try to resolve queries from the cache (if `skipCache` is `false`),\nthen deduplicate in-flight requests that have the same query and variables, and then send the\noperations that come through to your API endpoint. Lastly the result for queries will be written\nto the cache.\n\nYou can write your own exchanges if you wish to customise this behaviour. The [client](#client)\naccepts the `transformExchange` function. This function receives the default exchange, as described\nabove. So if you'd like to wrap the default exchange and do something custom, you can, or if you'd like\nto replace the default exchange you can just return an entirely different exchange.\n\nThe **“Operations”** that an exchange receives have the following properties:\n\n| Name          | Value     | Description                                              |\n| ------------- | --------- | -------------------------------------------------------- |\n| key           | `string`  | The cache key of an operation (query + variables hashed) |\n| query         | `string`  | The GraphQL query string                                 |\n| variables     | `?object` | Variables for the GraphQL query                          |\n| operationName | `string`  | The operation’s name, `query` or `mutation`              |\n| context       | `object`  | A dictionary of options                                  |\n\nThe `context` property can be used for any data, but the `httpExchange` in particular uses it to\nreceive the `url` and `fetchOptions`, and the `cacheExchange` uses it to receive the `skipCache`\nflag.\n\nThe result that an exchange emits in an observable is like GraphQL’s `ExecutionResult`. It carries\nthe `data` property, the `error` property that can be a [`CombinedError`](#combinederror), and\nthe `typeNames` property, which tells `urql` which parts of the cache to invalidate.\n\nIf you'd like to write your own exchange you could approach it like so:\n\n```javascript\nimport Observable from 'zen-observable-ts';\n\nconst funExchange = forward => operation =>\n  new Observable(observer => {\n    const subscription = forward(operation).subscribe({\n      next: result => {\n        result.fun = true;\n        observer.next(fun);\n      },\n      error: e => observer.error(e),\n      complete: () => observer.complete(),\n    });\n\n    return () => subscription.unsubscribe();\n  });\n\nconst client = new Client({\n  url: 'http://localhost:3000/graphql',\n  transformExchange: (exchange, _client) => funExchange(exchange),\n});\n```\n\n### use urql without using components\n\nWhile the goal of this project is to work nicely with react, sometimes you just need to do a mutation or a query without using any components. In this case you can call [client.executeQuery](src/components/client.tsx#L188) directly.\n\nExample:\n\n```javascript\nlet variables = { q: 'Did I do that?' };\nlet skipCache = true; //set this to true if you don't need cache\nclient.executeQuery(query(myQuery, variables), skipCache).then(function(data) {\n  console.log(data);\n});\n```\n\n## TODO\n\n* [ ] Server Side Rendering\n* [ ] Client Side Resolvers\n* [ ] Cache update reactivity\n* [ ] Prefix all errors with \"Did I do that?\"\n\n## Prior Art\n\n### Apollo\n\nThis library wouldn't be possible without [Apollo](https://www.apollographql.com/). Apollo was what made GraphQL click for me. I need to give big shout outs to folks like [@stubailo](https://github.com/stubailo), [@jbaxleyiii](https://github.com/jbaxleyiii) and [@peggyrayzis](https://github.com/peggyrayzis), without whom I wouldn't even know GraphQL. Enormous amounts of inspiration for this lib came from Apollo and its architecture.\n","licenseText":"MIT License\n\nCopyright (c) 2018 Formidable\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"urql@0.3.0-next4","dist":{"shasum":"4461624aa43aaac49f8e349242d4a6e4e67ed4e2","tarball":"http://registry-npm.ywwl.com/urql/download/urql-0.3.0-next4.tgz","fileCount":103,"unpackedSize":132379,"integrity":"sha512-D6STrOTQUfjEr2ZvfVn64q/mHsKqAWePgkI73zjBXq/ahwEKIs7LQJYrXn0Go64R3nnfPlbuMkyAcoJorx6ezA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGXnzYAobMyBo0srJQtygPXL2PMX8QLDtpWLRgcaUMQYAiEAuK5fjuzpgrx4aSBfT2bMcafQfvC11lRfJQD0TLEA8E8="}],"size":33182,"noattachment":false,"key":"/urql/-/urql-0.3.0-next4.tgz"},"maintainers":[{"name":"thekenwheeler","email":"ken_wheeler@me.com"}],"_npmUser":{"name":"philpl","email":"phil@kitten.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/urql_0.3.0-next4_1531245424648_0.745730657440753"},"_hasShrinkwrap":false,"publish_time":1531245425387,"_cnpm_publish_time":1531245425387,"dist-tags":{"canary":"5.0.2-canary-887cb2a161e22597803652e60df93b98a485dc8d","latest":"5.0.4","next":"1.4.1-next.1"}}