A GraphQL client for React using modern context and hooks APIs that is lightweight (< 4 kB) but powerful; the first Relay and Apollo alternative with server side rendering.
MIT License
Bot releases are visible (Hide)
Published by jaydenseric over 6 years ago
ava
with tap
for testing. Tests don't require a special CLI, no longer transpile on the fly, are faster and AVA no longer dictates the Babel version..mjs
and .js
files in native ESM (--experimental-modules
) and CJS environments.babel.config.js
instead of .babelrc.js
.ESM
environment variable to BABEL_ESM
to be more specific.package.json
scripts:
npm-run-all
more for parallelism and reduced noise.test
script. Travis CI will fail PR's with lint errors.cross-env
; contributors with Windows may setup and use a Bash shell.eslint-plugin-ava
dev dependency and config.Published by jaydenseric over 6 years ago
Accept
header for display consistency in tools such as the Chrome network inspector and to better support case-sensitive systems, even though HTTP headers are supposed to be case-insensitive.@babel
dev dependencies to match new AVA requirements.eslint-config-prettier
.fake-tag
for GraphQL template literals due to prettier/prettier#4360.express
instead of Koa packages.express-graphql
instead of Apollo packages.apollo-upload-server
as there are no upload tests yet.get-port
as not providing a port to app.listen
has the same effect.esm
due to graphql/express-graphql#425.Published by jaydenseric over 6 years ago
react
peer dependency to ^16.3.1
.preload
broken due to the React v16.3.1 context API change.short_name
.<html>
lang
attribute.Published by jaydenseric over 6 years ago
fetchError
Query
render function argument, enabling graceful caching and handling of errors in situations such as when a global fetch
API is unavailable or a relative URL is used on the sever.isomorphic-unfetch
with the more updated cross-fetch
..prettierignore
to defer package.json
formatting to npm.Published by jaydenseric over 6 years ago
Published by jaydenseric over 6 years ago
Promise
polyfill; consumers can polyfill as required for optimal bundle size. Required polyfills are documented in the readme.object-assign
React dependency with babel-plugin-transform-replace-object-assign
.Published by jaydenseric over 6 years ago
GraphQLProvider
and GraphQLConsumer
to Provider
and Consumer
.GraphQLQuery
.GraphQLQuery
and Query
names.GraphQLMutation
component; GraphQLQuery
can be used for both queries and mutations.GraphQLQuery
component loadOnMount
and loadOnReset
props now default to false
:
static defaultProps
reduces bundle size.<GraphQLQuery />
and <GraphQLQuery loadOnReset />
vs <GraphQLQuery loadOnReset={false} />
and <GraphQLQuery loadOnReset={true} />
.GraphQL
query
instance method now accepts an options object.GraphQL
constructor requestOptions
option.Query
component now has a fetchOptionsOverride
prop, allowing components to easily query any GraphQL API. Consumers may export an override function tailored for each API in one place to make things DRY.preload
API for server side rendering, fixing #2.Query
component resetOnLoad
prop doesn’t cause cache for the request that triggered a reset to delete, allowing simultaneous use with loadOnReset
. Fixes #3.GraphQL
reset
instance method now accepts a fetch options hash to exempt a request from cache deletion.parseError
..mjs
.graphql-react
a published dependency, via #1.Published by jaydenseric over 6 years ago
Initial release.