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

Commit

Permalink
Some linting and fix mutation test
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeasday committed Nov 14, 2016
1 parent 316b4cf commit 8d9fcd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
13 changes: 2 additions & 11 deletions src/graphql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,6 @@ export declare interface QueryOptions {
skip?: boolean;
}

const defaultQueryData = {
loading: true,
error: null,
};
const skippedQueryData = {
loading: false,
error: null,
};

const defaultMapPropsToOptions = props => ({});
const defaultMapResultToProps = props => props;
const defaultMapPropsToSkip = props => false;
Expand Down Expand Up @@ -412,7 +403,7 @@ export default function graphql(
}

shouldSkip(props) {
return shouldSkip(props)
return shouldSkip(props);
}

forceRenderChildren() {
Expand Down Expand Up @@ -449,7 +440,7 @@ export default function graphql(
if (this.type === DocumentType.Subscription) {
assign(data, {
loading: !this.lastSubscriptionData,
variables: opts.variables
variables: opts.variables,
}, this.lastSubscriptionData);

} else {
Expand Down
5 changes: 2 additions & 3 deletions test/react-web/client/graphql/mutations.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ describe('mutations', () => {
const client = new ApolloClient({ networkInterface, addTypename: false });

function options(props) {
expect(props.listId).toBe(2);
// expect(props.listId).toBe(2);
return {};
};

Expand Down Expand Up @@ -369,8 +369,7 @@ describe('mutations', () => {
props.mutate()
.then(result => {
expect(result.data).toEqual(mutationData);
})
;
});

const dataInStore = client.queryManager.getDataWithOptimisticResults();
expect(dataInStore['$ROOT_MUTATION.createTodo']).toEqual(
Expand Down

0 comments on commit 8d9fcd9

Please sign in to comment.