You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/contentful-and-the-starter-template.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -129,12 +129,12 @@ The new field is now available, let's add a value in the `Homepage` entry:
129
129
130
130
Now, let's connect the new `Greeting` field to our Starter Template source code:
131
131
132
-
- In your terminal of choice, run `yarn run graphql-codegen:generate`, this script will sync the Starter Template's source code with the web app content models, and generate the necessary updated typings files.
132
+
- In your terminal of choice, run `yarn run graphql-codegen:watch`, this script will sync the Starter Template's source code with the web app content models, and generate the necessary updated typings files, as soon as a change is made in a `.graphql` file.
133
133
- In our case, it will update the typings of our `💎 Hero banner component` content type, to make the `Greeting` field available.
134
134
- Open the `ctf-hero-banner.graphql` file, this file represents the query made to Contentful to get the `💎 Hero banner component` content type fields values
135
-
- Follow the comment in the file, line #7.
135
+
- Follow the comment in the file, line #7, save the changes.
136
136
- Open the `ctf-hero-banner.tsx` file, this file represents the `💎 Hero banner component` content type.
137
-
- Follow the comments in the file, lines #99 and #142.
137
+
- Follow the comments in the file, lines #99 and #142, save the changes.
138
138
- Navigate to the running Starter Template application, [http://localhost:3000/](http://localhost:3000/)
139
139
- If the application is not running yet, in your terminal of choice, run `yarn dev`.
140
140
- You should see the `Greeting` field in the Homepage - Hero section.
0 commit comments