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

GraphQL Query Error caused by coverImage #8

Closed
lauragift21 opened this issue Mar 1, 2019 · 13 comments
Closed

GraphQL Query Error caused by coverImage #8

lauragift21 opened this issue Mar 1, 2019 · 13 comments

Comments

@lauragift21
Copy link
Member

@lauragift21 lauragift21 commented Mar 1, 2019

I keep coming across this error whenever I delete a post with cover_image in the frontmatter. The error thrown is

Error: Unknown argument "width" on field "coverImage" of type "Post".
@lauragift21 lauragift21 changed the title GraphQL Query Error cause by coverImage GraphQL Query Error caused by coverImage Mar 1, 2019
@hjvedvik
Copy link
Member

@hjvedvik hjvedvik commented Mar 2, 2019

Does this happen while the development server is running or when you start up again after deleting a post?

Loading

@lauragift21
Copy link
Member Author

@lauragift21 lauragift21 commented Mar 2, 2019

It happens when I delete the post and start up the server again.

Loading

@hjvedvik
Copy link
Member

@hjvedvik hjvedvik commented Mar 2, 2019

I see. Gridsome creates the GraphQL schema based on fields it finds at startup, so that's probably why the coverImage isn't an image field sometimes. We are working on a solution to make Gridsome remember the schema instead of just looking up fields on nodes every time you start the development server, but it's not ready yet :)

Loading

@lauragift21
Copy link
Member Author

@lauragift21 lauragift21 commented Mar 2, 2019

Alright, that makes sense. Looking forward to that fix.

Loading

@lauragift21 lauragift21 closed this Mar 2, 2019
@SamUndefined
Copy link

@SamUndefined SamUndefined commented Mar 4, 2019

@lauragift21 Have you by chance found a decent workaround in the meantime?

Locally, I've been deleting those arguments, starting the server, and then re-adding them after reboot. On (Netlify) deploy, I just run re-run the build until it works 😬

Loading

@lauragift21
Copy link
Member Author

@lauragift21 lauragift21 commented Mar 4, 2019

No I haven't yet. I'm hoping the fix get merged in soon enough.

Loading

@kendallroth
Copy link

@kendallroth kendallroth commented Mar 16, 2019

I've had this happen whenever I change the image path in frontmatter as follows:

# Builds and displays
cover_image: /images/test.jpg

# Builds but does not display image (doesn't exist?)
cover_image: ./images/test.jpg

# Doesn't build and displays this error (path saved by Netlify CMS)
cover_image: images/test.jpg

Loading

@Xstoudi
Copy link

@Xstoudi Xstoudi commented May 24, 2019

Is there an update about this issue ? How can I re-generate the GraphQL schem ?

Loading

@miralize
Copy link

@miralize miralize commented Jun 6, 2019

Is there a workaround for this, @hjvedvik?

Loading

@eleijonmarck
Copy link

@eleijonmarck eleijonmarck commented Jul 28, 2019

@Xstoudi @miralize Have you tried?

rm -rf node_modules
rm -rf .cache

Loading

iagocavalcante added a commit to iagocavalcante/handsome-blog that referenced this issue Sep 16, 2019
Esse problema já é conhecido, mas ainda não tem uma solução correta para isso gridsome/gridsome-starter-blog#8
@dizid
Copy link

@dizid dizid commented Oct 17, 2019

Here is a plugin that might fix this error

Loading

@RehanSaeed
Copy link

@RehanSaeed RehanSaeed commented Mar 11, 2020

I'm getting this error on GitHub actions when doing a build, not develop. Is there any workaround?

Loading

@RehanSaeed
Copy link

@RehanSaeed RehanSaeed commented Mar 28, 2020

Did you find a resolution? I raised gridsome/gridsome#1031.

Loading

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

Successfully merging a pull request may close this issue.

None yet
9 participants