Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Releases: department-stockholm/apollo-component

1.10.0

23 Mar 08:57
a06624b
Compare
Choose a tag to compare

Minor Changes

  • Added func support for <Mutate variables/>: 1b1be7d

1.9.2

02 Feb 09:24
28d38ca
Compare
Choose a tag to compare

Patches

  • Made sure .npmignore keeps all of src/. Fixes #1: c45bc1f

Thanks to @pyros2097 for reporting this!

1.9.1

18 Jan 17:27
f486e03
Compare
Choose a tag to compare

Patches

  • Avoid a request completely when skipped: 470b7b7

1.9.0

18 Jan 15:49
8c49e5b
Compare
Choose a tag to compare

Minor Changes

  • Added skip functionality: e25943f

Example usage:

const SearchResult = ({ q }) => (
  <div>
    <Query
      gql={SearchQuery}
      variables={{ q }}
      skip={q.length < 2} // or as func: skip={vars => vars.q.length < 2}
    >
      {({ data: { results }, loading, skipped }) =>
        skipped || !results ? (
          <span>
            Enter more than 2 characters (hint: try "he" or "ol" or "lo")
          </span>
        ) : loading ? (
          <span>Getting your stuffs!</span>
        ) : !results.length ? (
          <span>No results...try something shorter</span>
        ) : (
          <ol>
            {results.map(({ id, description }) => (
              <li key={id}>{description}</li>
            ))}
          </ol>
        )
      }
    </Query>
  </div>
);

1.8.0

22 Dec 10:41
4f0606d
Compare
Choose a tag to compare

Minor Changes

  • Trigger a render on refetch/fetchMore to show loader (unless there's a wait prop): 6d4748a

1.7.0

13 Dec 15:08
165fc4e
Compare
Choose a tag to compare

Minor Changes

  • Added missing Mock methods: c2e9d77

Patches

  • Split up bundle using microbundle: a24d185
  • Updated examples to use new split style modules: 68efc19

1.6.0

29 Nov 10:45
2b9ce36
Compare
Choose a tag to compare

Minor Changes

  • Guard against event objects in Mutate callback: 3db8636
  • Use variables prop as default variables in Mutate: 4c981dd

Patches

  • Fixed reference error in Mutate component: 337c664

v1.5.0

27 Nov 09:55
ad81b60
Compare
Choose a tag to compare

Minor Changes

  • Not using react-dom anymore. Using homebrewn renderer based off react-apollo: 03cfd5d
  • Renamed internal queue and pass through nested Providers: 034385a

Patches

  • Added documentation about renderState: dfb40db

v1.4.0

25 Nov 10:35
6142673
Compare
Choose a tag to compare

Minor Changes

  • Added PropTypes to Mutate: b32c7b5
  • Default to query props on refetch(): 75c1f32
  • Allow direct refetch even with event without failing: 831fc75

Patches

  • Throw a helpful message when there's a missing Provider: 11eb545
  • Improved API documentation in Readme: b4f142e
  • Added License file: 5431fd3
  • Updated build dependencies: 68943bb
  • Try using a fragment in renderToDOM to save some memory: dd1c9b2

v1.3.0

24 Nov 09:48
a27d39b
Compare
Choose a tag to compare

Minor Changes

  • Build with buble instead of babel: 6b2f188
  • Use less new js to work with buble: cb577d2
  • Working on error handling: e1b3d97

Patches

  • Avoid warnings on browser build: ea8b1e5
  • Updated dependencies: 13f26f8