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
feat(gatsby-source-wordpress): MediaItem.excludeFieldNames / auto exclude interface types that have no fields (#37062)
* allow MediaItem type to use excludeFieldNames option
* make sure cached media item nodes always return the MediaItem node, not File nodes if those are cached
* use get type settings helper instead of accessing settings on options
* auto exclude interface types that have no fields due to an implementing type excluding all of it's fields
* this should've been excluded before! Fixed now
* update comment
* use Map for caching instead of object properties
* exclude MediaItem.template field in tests
* remove debug code
@@ -1230,6 +1231,26 @@ A special type which is applied to any non-node root fields that are ingested an
1230
1231
1231
1232
**Field type**: `Object`
1232
1233
1234
+
#### type.MediaItem.excludeFieldNames
1235
+
1236
+
Excludes fields on the MediaItem type by field name.
1237
+
1238
+
**Field type**: `Array`
1239
+
1240
+
```js
1241
+
{
1242
+
resolve:`gatsby-source-wordpress`,
1243
+
options: {
1244
+
type: {
1245
+
MediaItem: {
1246
+
excludeFieldNames: [`dateGmt`, `parent`],
1247
+
},
1248
+
},
1249
+
},
1250
+
}
1251
+
1252
+
```
1253
+
1233
1254
#### type.MediaItem.placeholderSizeName
1234
1255
1235
1256
This option allows you to choose the placeholder size used in the new Gatsby image service (currently in ALPHA/BETA) for the small placeholder image. Please make this image size very small for better performance. 20px or smaller width is recommended. To use, create a new image size in WP and name it "gatsby-image-placeholder" (or the name that you pass to this option) and that new size will be used automatically for placeholder images in the Gatsby build.
Copy file name to clipboardexpand all lines: packages/gatsby-source-wordpress/src/steps/ingest-remote-schema/build-queries-from-introspection/recursively-transform-fields.js
0 commit comments