Skip to content

Commit cfc2fd8

Browse files
committed
docs(README): add note on Bad Request
1 parent d4d84a2 commit cfc2fd8

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

demo/graphcms-fragments/Product.graphql

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,26 @@ fragment Product on Product {
3838
}
3939
price
4040
test {
41-
... on RichText {
41+
... on ProductTestRichText {
4242
raw
43+
json
4344
html
4445
markdown
4546
text
47+
references {
48+
... on Asset {
49+
remoteTypeName: __typename
50+
remoteId: id
51+
locale
52+
stage
53+
}
54+
... on Category {
55+
remoteTypeName: __typename
56+
remoteId: id
57+
locale
58+
stage
59+
}
60+
}
4661
}
4762
}
4863
createdBy {

gatsby-source-graphcms/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ module.exports = {
265265

266266
Enabling this option adds a `markdownNode` nested field to all `RichText` fields on the generated Gatsby schema.
267267

268+
You will need to rebuild your `graphcms-fragments` if you enable embeds on a Rich Text field, or you add/remove additional fields to your GraphCMS schema.
269+
268270
#### Usage with `gatsby-plugin-mdx`
269271

270272
These newly built nodes can be used with [`gatsby-plugin-mdx`](https://www.gatsbyjs.org/packages/gatsby-plugin-mdx) to render markdown from GraphCMS.
@@ -380,3 +382,12 @@ If it's already included, make sure you have your ENV variable added to `.env`,
380382
This error occurs most likely if your token doesn't have access to the `PUBLISHED` content stage. Configure your token to also access `PUBLISHED`, or specify `stages: ["DRAFT"]` to the options inside `gatsby-config.js`.
381383

382384
</details>
385+
386+
<details>
387+
<summary>Bad request</summary>
388+
389+
You may need to rebuild your fragments folder when making schema changes. If you change the type of a field, or add/remove any from an existing model you have fragments for, the plugin cannot query for this.
390+
391+
Simply delete the `graphcms-fragments` (or whatever you named it), and run `gatsby develop` to regenerate.
392+
393+
</details>

0 commit comments

Comments
 (0)