Version 1.0.0-alpha.1
Pre-release
Pre-release
·
530 commits
to master
since this release
Major
- Updated Node.js support to v7.6+.
- Renamed
GraphQLProvider
andGraphQLConsumer
toProvider
andConsumer
. - No longer exporting
GraphQLQuery
. - Swapped the
GraphQLQuery
andQuery
names. - Removed
GraphQLMutation
component;GraphQLQuery
can be used for both queries and mutations. GraphQLQuery
componentloadOnMount
andloadOnReset
props now default tofalse
:- Opt-in is safer for mutations.
- Removing
static defaultProps
reduces bundle size. - Nicer valueless boolean props (
<GraphQLQuery />
and<GraphQLQuery loadOnReset />
vs<GraphQLQuery loadOnReset={false} />
and<GraphQLQuery loadOnReset={true} />
.
- The
GraphQL
query
instance method now accepts an options object. - New approach to configuring GraphQL request fetch options:
- Removed the
GraphQL
constructorrequestOptions
option. - The
Query
component now has afetchOptionsOverride
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. - The Next.js example app has been updated to demo the new API using the external GraphQL Pokémon API.
- Removed the
Minor
- New
preload
API for server side rendering, fixing #2. - The
Query
componentresetOnLoad
prop doesn’t cause cache for the request that triggered a reset to delete, allowing simultaneous use withloadOnReset
. Fixes #3. - The
GraphQL
reset
instance method now accepts a fetch options hash to exempt a request from cache deletion.
Patch
- Updated dependencies.
- Fetch errors when a request could not be sent at all (e.g. a relative URL can’t be used for server side rendering) are uncaught instead of incorrectly cached as a
parseError
. - Simplified the JSDoc script, now that Documentation.js handles
.mjs
. - Prevent lib or example updates from triggering tests in watch mode.
- Fixed the example setup script and made
graphql-react
a published dependency, via #1. - Commented GraphQL template literals for editor syntax highlighting.
- Configured Travis and added a build status readme badge.
- Improved API documentation.