Hej jak mogę wyświetlić zmienną data ?
export async function getStaticProps() {
const apolloClient = getApolloClient();
const data = await apolloClient.query({
query: gql`
query getForm {
gfForm(id: 1, idType: DATABASE_ID) {
formId
title
description
formFields(first: 500) {
nodes {
... on TextField {
id
type
label
}
... on SelectField {
id
type
label
choices {
text
value
}
}
}
}
}
gfForms {
nodes {
id
}
}
}`
})
}
To jest w NextJS rozumiem, że potem robie jakiegoś returna ale co dalej? Z tego co patrzyłem console.log(data) zwraca błędy ;)