From 5bb126242b1cad6e1c2e01b62c63dfc6f4c4ac13 Mon Sep 17 00:00:00 2001 From: Evans Hauser Date: Wed, 5 Dec 2018 00:04:10 -0800 Subject: [PATCH 1/3] Docs: Include GET_TODOS in essentials/mutations We reference GET_TODOS throughout the mutation docs. Now we explicitly define it --- docs/source/essentials/mutations.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/source/essentials/mutations.md b/docs/source/essentials/mutations.md index 93679619552..72f10d178eb 100644 --- a/docs/source/essentials/mutations.md +++ b/docs/source/essentials/mutations.md @@ -74,6 +74,10 @@ The second argument to the update function is an object with a data property con Now that we've learned about the update function, let's implement one for the `Mutation` component we just built! ```jsx +const GET_TODOS = gql`query GetTodos { + todos +}`; + const AddTodo = () => { let input; From e9876b92553693f9fd9e78802250add1847ccf97 Mon Sep 17 00:00:00 2001 From: Evans Hauser Date: Fri, 7 Dec 2018 12:02:32 -0800 Subject: [PATCH 2/3] [SQUASH] Run prettier over graphql query --- docs/source/essentials/mutations.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/source/essentials/mutations.md b/docs/source/essentials/mutations.md index 72f10d178eb..0d32eded8dc 100644 --- a/docs/source/essentials/mutations.md +++ b/docs/source/essentials/mutations.md @@ -74,9 +74,11 @@ The second argument to the update function is an object with a data property con Now that we've learned about the update function, let's implement one for the `Mutation` component we just built! ```jsx -const GET_TODOS = gql`query GetTodos { - todos -}`; +const GET_TODOS = gql` + query GetTodos { + todos + } +`; const AddTodo = () => { let input; @@ -88,7 +90,7 @@ const AddTodo = () => { const { todos } = cache.readQuery({ query: GET_TODOS }); cache.writeQuery({ query: GET_TODOS, - data: { todos: todos.concat([addTodo]) } + data: { todos: todos.concat([addTodo]) }, }); }} > From 3b9be628f25d2fcfb99b9831a8718f21e4c52ce9 Mon Sep 17 00:00:00 2001 From: Hugh Willson Date: Wed, 2 Jan 2019 15:04:00 -0500 Subject: [PATCH 3/3] Changelog update --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88386a8e9c0..1b39d77bf9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,8 @@ [@jedwards1211](https://github.com/jedwards1211) in [#4179](https://github.com/apollographql/apollo-client/pull/4179)
[@nutboltu](https://github.com/nutboltu) in [#4182](https://github.com/apollographql/apollo-client/pull/4182)
[@CarloPalinckx](https://github.com/CarloPalinckx) in [#4189](https://github.com/apollographql/apollo-client/pull/4189)
- [@joebernard](https://github.com/joebernard) in [#4206](https://github.com/apollographql/apollo-client/pull/4206) + [@joebernard](https://github.com/joebernard) in [#4206](https://github.com/apollographql/apollo-client/pull/4206)
+ [@evans](https://github.com/evans) in [#4213](https://github.com/apollographql/apollo-client/pull/4213) ### Apollo Utilities (vNext)