Promise-based GraphQL Libraries for Javascript
Execute a GraphQL query exactly like you would a fetch
request. No dependencies included.
Takes a url
and an init
object as input. Returns a Promise containing the results of the request.
// fetch
fetch('/graphql', { body: JSON.stringify({ query: '{ foo { bar baz } }' }) })
// query
import { query } from 'wasp-graphql'
query('/graphql', { fields: '{ foo { bar baz } }' })
// Logging the results
fetch(url, init)
.then(res => res.json())
.then(json => console.log(json))
query(url, init)
.then(res => res.json())
.then(json => console.log(json))
Automates GraphQL queries for an existing Redux codebase.
Provides integration between Redux and Apollo.
Keeps apollo-state-cache and the redux store in sync whenever you execute an Apollo query.
Read our Code of Conduct here.
Free and Open Source under the MIT License.