gatsbyjs: Query gatsby data via client side graphql query
up vote
0
down vote
favorite
I have a Gatsby site pulling data from contentful and everything is working well for getting the data into the static routes generated by gatsby-node.js
. But I also have some sections of the site which use client only routes pulling user-specific data from a rest API via axios (also working great).
Can I use graphql to query the contentful data generated at build time in the client only pages? Ideally, I don't have to query it from contentful client side if it's already in Gatsby. Would be great to see any examples out there, my searches turned up nothing.
graphql gatsby
add a comment |
up vote
0
down vote
favorite
I have a Gatsby site pulling data from contentful and everything is working well for getting the data into the static routes generated by gatsby-node.js
. But I also have some sections of the site which use client only routes pulling user-specific data from a rest API via axios (also working great).
Can I use graphql to query the contentful data generated at build time in the client only pages? Ideally, I don't have to query it from contentful client side if it's already in Gatsby. Would be great to see any examples out there, my searches turned up nothing.
graphql gatsby
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a Gatsby site pulling data from contentful and everything is working well for getting the data into the static routes generated by gatsby-node.js
. But I also have some sections of the site which use client only routes pulling user-specific data from a rest API via axios (also working great).
Can I use graphql to query the contentful data generated at build time in the client only pages? Ideally, I don't have to query it from contentful client side if it's already in Gatsby. Would be great to see any examples out there, my searches turned up nothing.
graphql gatsby
I have a Gatsby site pulling data from contentful and everything is working well for getting the data into the static routes generated by gatsby-node.js
. But I also have some sections of the site which use client only routes pulling user-specific data from a rest API via axios (also working great).
Can I use graphql to query the contentful data generated at build time in the client only pages? Ideally, I don't have to query it from contentful client side if it's already in Gatsby. Would be great to see any examples out there, my searches turned up nothing.
graphql gatsby
graphql gatsby
asked Nov 11 at 0:00
all9lives
11
11
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53244617%2fgatsbyjs-query-gatsby-data-via-client-side-graphql-query%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown