From e06ba6c3949af6d93d9760706b6c24b8341c99c0 Mon Sep 17 00:00:00 2001 From: Justin Anastos Date: Wed, 28 Nov 2018 14:32:11 -0500 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=93=9D=20update=20local=20state=20doc?= =?UTF-8?q?s=20to=20work=20with=20apollo-cli=20codegen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [`apollo client:codegen`](https://github.com/apollographql/apollo-tooling#apollo-clientcodegen-output) only looks inside `gql` tags. We need to use `gql` for the client-side schema so that the codegen validator will recognize the schema at all. This will update the apollo-client docs so that they'll be compatible with codegen. --- docs/source/essentials/local-state.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/source/essentials/local-state.md b/docs/source/essentials/local-state.md index 3d7295dfad9..87693c51f45 100644 --- a/docs/source/essentials/local-state.md +++ b/docs/source/essentials/local-state.md @@ -239,7 +239,9 @@ You can optionally pass a client-side schema to the `typeDefs` config property. Your schema should be written in [Schema Definition Language](/docs/graphql-tools/generate-schema.html#schema-language). Let's view our schema for our todo app: ```js -const typeDefs = ` +import gql from 'graphql-tag'; + +const typeDefs = gql` type Todo { id: Int! text: String! From aed939f2076721138258d24f131e1dc09b33f59e Mon Sep 17 00:00:00 2001 From: Hugh Willson Date: Wed, 28 Nov 2018 14:40:36 -0500 Subject: [PATCH 2/2] Changelog update --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6634259491..f8b786ffbe9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## Apollo Client (vNext) +### Apollo Client (vNext) + +- Documtation updates.
+ [@justinanastos](https://github.com/justinanastos) in [#4187](https://github.com/apollographql/apollo-client/pull/4187) + ### Apollo Utilities (vNext) - Schema/AST tranformation utilities have been updated to work properly with