Skip to content
Advertisement

Tag: graphql

How to create schema customization to use optional field “featureImage” from gatsby blog

I’m making a Gatsby blog as a side project. I want to use the “featureImage” optional field in mdx frontmatter. I tried to refer to the https://www.gatsbyjs.com/docs/reference/graphql-data-layer/schema-customization#creating-type-definitions document according to the error message, but it was difficult to understand. This is part of my code. index.js gatsby-node.js I tried this and it works when featureImage is not present. But if

Only display icon in parent if there’s the relevant data in child component, but in order to have the data I must click on that icon

Alright, it took me awhile to even formulate the question for this. This is more related to a design strategy rather than anything. I have a view that contains a table that displays a list of all users.Each row of the table has an icon on the left that will expand (or collapse) a component called UsersTrainingSummary that just brings

Variable “$file” got invalid value

I try to upload a file with GraphQL. While upload, I get following error message: Variable “$file” got invalid value { resolve: [function], reject: [function], promise: {}, file: { filename: “insung-yoon-TPvE8qPfMr0-unsplash.jpg”, mimetype: “image/jpeg”, encoding: “7bit”, createReadStream: [function createReadStream] } }; Upload value invalid. The only solution I found, was to disable the upload at apollo-graphql and add graphql-upload I already

gatsby-image-background using v3 gatsby-image

I am trying to make gatsby-background-image work with v3 of gatsby-plugin-image. I have followed documentation and found I should be using gbimage-bridge. For some reason it doesn’t seem to work. My query works fine when testing in ide. I have tried to change my query and consts in all sorts of ways but can’t seem to make it work. Right

Advertisement