gridsome-starter-wordpress
gridsome-starter-wordpress copied to clipboard
sourceUrl error
Error: Cannot query field "sourceUrl" on type "WordPressAttachment".
GraphQL request (36:7) 35: featuredMedia { 36: sourceUrl ^ 37: altText
NB : i run my WP on local with mamp
Can you help me ? Thanks
I am getting this same error.
It seems that you need to add a featured image as well as a tag, otherwise it won't compile. If you add an image to your post and add a tag, it should work.
I've spend 2 hours finding this error out. This should be captured by the code when people do not have tags or a featured image.
so this issue is not fixed yet???
i am able to fix it by removing lines related to featuredImage (since my site doesn't use featured images at all)
Could you share your solution?
The requirements won't be satisfied until
-
every post has featured image and tag
-
you need to add tag into the Posts>Tags menu.
Then it will compile.
I personally think that this should be fixed and it should work out-of-the-box with fresh WP setup.
Any updates on this? I am getting the same error.
if they make tag and featured images optional and show them only if have it...then problem will be fixed.
Emmmm, it seems to be one of the features of GraphQL.
GraphQL guarantees that you can receive data as the format that you request.
Thus it is hard to make it optional.
Just to confirm, adding a featured image and a tag to posts, fixes the issue.