How can I consume two queries in the single component? #28961
Unanswered
monicavasco
asked this question in
Help
Replies: 1 comment
-
Hey. You just have the syntax slightly wrong. Try this: query getPosts($skip: Int!, $limit: Int!) {
posts: allContentfulBlog(skip: $skip, limit: $limit, sort: {fields: Published, order: DESC}) {
edges {
node {
slug
title
id: contentful_id
category
excerpt
Published(locale: "pt-br", formatString: "DD [de] MMMM [de] YYYY")
body {
json
}
}
}
}
BcgBlog: file(relativePath: {eq: "BcgBlog.jpg"}) {
childImageSharp {
fluid(quality: 90, maxWidth: 4160) {
...GatsbyImageSharpFluid_withWebp
}
}
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I need to consume a background image and a list of posts. however it is giving the following
error: Syntax Error: Expected Name, found $ ..
I've tried to find a similar answer, but I can't.
Can someone help me?
Beta Was this translation helpful? Give feedback.
All reactions