Field Default ValueField Default ValueAddition of the @default directive to the GraphQL schema, to set a value to null or empty fields. { post(by: { id: 1 }) { featuredImage { id src } featuredImageOrDefault: featuredImage @default(value: 55) { id src } } }Copy { "data": { "post": { "featuredImage": null, "featuredImageOrDefault": { "id": 55, "src": "http://mysite.com/wp-content/uploads/my-default-image.png" } } } }Copy
Addition of the @default directive to the GraphQL schema, to set a value to null or empty fields. { post(by: { id: 1 }) { featuredImage { id src } featuredImageOrDefault: featuredImage @default(value: 55) { id src } } }Copy { "data": { "post": { "featuredImage": null, "featuredImageOrDefault": { "id": 55, "src": "http://mysite.com/wp-content/uploads/my-default-image.png" } } } }Copy