Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/akryum/apollo-client-browser

A browser-ready version of apollo-client
https://github.com/akryum/apollo-client-browser

apollo apollographql graphql

Last synced: 23 days ago
JSON representation

A browser-ready version of apollo-client

Awesome Lists containing this project

README

        

# apollo-client-browser
[![npm](https://img.shields.io/npm/v/apollo-client-browser.svg) ![npm](https://img.shields.io/npm/dm/apollo-client-browser.svg)](https://www.npmjs.com/package/apollo-client-browser)

A browser-ready version of apollo-client: [demo](https://jsfiddle.net/Akryum/oyejk2qL/)

```html

const apolloClient = new Apollo.lib.ApolloClient({
networkInterface: Apollo.lib.createNetworkInterface({
// Edit on https://launchpad.graphql.com/nnnwvmq07
uri: 'https://nnnwvmq07.lp.gql.zone/graphql',
transportBatching: true,
}),
connectToDevTools: true,
})

const POSTS_QUERY = Apollo.gql`
{
posts {
id
title
author {
id
name
}
}
}
`

```

See [apollo-client](https://github.com/apollographql/apollo-client) for more info.