Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sourceUrl error #15

Open
DavidFyon opened this issue Jun 1, 2019 · 10 comments
Open

sourceUrl error #15

DavidFyon opened this issue Jun 1, 2019 · 10 comments

Comments

@DavidFyon
Copy link

DavidFyon commented Jun 1, 2019

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

@sethharris4989
Copy link

I am getting this same error.

@StevenStavrakis
Copy link

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.

@nitras
Copy link

nitras commented Aug 22, 2019

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.

@lorvent
Copy link

lorvent commented Dec 28, 2019

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)

@truc0
Copy link

truc0 commented Feb 23, 2020

Could you share your solution?

@Keromudo
Copy link

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.

@binnyFriedman
Copy link

binnyFriedman commented Jun 27, 2020

Any updates on this? I am getting the same error.

@lorvent
Copy link

lorvent commented Jun 27, 2020

if they make tag and featured images optional and show them only if have it...then problem will be fixed.

@truc0
Copy link

truc0 commented Jun 27, 2020

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.

@wbarnard81
Copy link

Just to confirm, adding a featured image and a tag to posts, fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants