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

Update to Apollo Client 0.5 #277

Merged
merged 13 commits into from
Oct 18, 2016
Merged

Update to Apollo Client 0.5 #277

merged 13 commits into from
Oct 18, 2016

Conversation

stubailo
Copy link
Contributor

@stubailo stubailo commented Oct 18, 2016

Blockers:

Tests passing:

  • test
  • ├── parser.test.ts
  • ├── react-native
  • │   ├── snapshots
  • │   │   └── component.test.js.snap
  • │   └── component.test.js
  • └── react-web
  • ├── client
  • │   ├── ApolloProvider.test.tsx
  • │   ├── graphql
  • │   │   ├── fragments.test.tsx
  • │   │   ├── mutations.test.tsx
  • │   │   ├── queries-1.test.tsx
  • │   │   ├── queries-2.test.tsx
  • │   │   ├── shared-operations-1.test.tsx
  • │   │   ├── shared-operations-2.test.tsx
  • │   │   ├── statics.test.tsx
  • │   │   └── subscriptions.test.tsx
  • │   └── libraries
  • │   ├── mobx.test.tsx
  • │   ├── redux-1.test.tsx
  • │   └── redux-2.test.tsx
  • └── server
  • └── index.test.tsx

TODO:

  • If this PR is a new feature, reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass
  • Update CHANGELOG.md with your change
  • If this was a change that affects the external API, update the docs and post a link to the PR in the discussion

@@ -21,7 +21,7 @@ describe('App', () => {
const query = gql`query people { allPeople(first: 1) { people { name } } }`;
const data = { allPeople: { people: { name: 'Luke Skywalker' } } };
const networkInterface = mockNetworkInterface({ request: { query }, result: { data } });
const client = new ApolloClient({ networkInterface });
const client = new ApolloClient({ networkInterface, addTypename: false });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do this all over the place and default the network interface to supporting it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the alternative?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we discussed making mockNetworkInterface support adding __typename to results automatically so we didn't have to worry about it in tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right. I guess this seemed easier for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I guess it just seems like the sort of change that is hard to back out later. But i'll merge it and do that later today.

@tmeasday tmeasday merged commit b18ceb4 into master Oct 18, 2016
@@ -66,8 +65,18 @@ const defaultMapResultToProps = props => props;
const defaultMapPropsToSkip = props => false;

// the fields we want to copy over to our data prop
const observableQueryFields = observable => pick(observable, 'variables',
'refetch', 'fetchMore', 'updateQuery', 'startPolling', 'stopPolling');
function observableQueryFields(observable) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmeasday @helfer I just realized I forgot to add subscribeToMore here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

patch release?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or do we just wait?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can patch. I don't think there's a big cost to more releases right.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants